Changeset 710


Ignore:
Timestamp:
Sep 13, 2006 11:02:26 AM (18 years ago)
Author:
bennylp
Message:

Updated README.txt again

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/README.txt

    r707 r710  
    22 
    33Getting Started: Building and Using PJSIP and PJMEDIA 
    4 [Last Update: 12/Sept/2006] 
    5  
    6    This article describes how to get, build, and use the open source PJSIP and 
    7    PJMEDIA SIP and media stack. You can get the online (and HTML) version of 
    8    this file in http://www.pjsip.org/using.htm 
    9  
    10  
    11 If you're so impatient.. 
    12  
    13    If you just want to get going quickly (and maybe read this document later), 
    14    this is what you can do to build the libraries: 
     4 
     5   [Last Update: Sept 13, 2006] 
     6     _________________________________________________________________ 
     7 
     8   This article describes how to download, customize, build, and use the open 
     9   source PJSIP and PJMEDIA SIP and media stack. The online (and HTML) version 
     10   of this file can be downloaded from http://www.pjsip.org/using.htm 
     11 
     12 
     13Quick Info 
    1514 
    1615   Building with GNU tools 
    17           Just do: 
     16          Generally these should be all that are needed to build the libraries, 
     17          applications, and samples: 
    1818 
    1919   $ ./configure 
    2020   $ make dep && make clean && make 
    2121 
    22    Building with Microsoft Visual Studio 
    23           Just follow the following steps: 
     22   Building Win32 Target with Microsoft Visual Studio 
     23          Generally we can just do these steps: 
    2424 
    2525         1. Open pjsip-apps/build/pjsip_apps.dsw workspace, 
     
    2828 
    2929   Building for Windows Mobile 
    30           Just follow the following steps: 
     30          Generally these are all that are needed: 
    3131 
    3232         1. Open pjsip-apps/build/wince-evc4/wince_demos.vcw EVC4 workspace, 
     
    3434         3. build the pjsua_wince application. 
    3535 
    36    With  all  the  build systems, the output libraries will be put in lib 
    37    directory under each projects, and the output binaries will be put in bin 
    38    directory under each projects. 
     36   With Visual Studio for Win32 target and the GNU build systems, the output 
     37   libraries will be put in lib directory under each projects, and the output 
     38   binaries will be put in bin directory under each projects. 
    3939 
    4040 
     
    8282     5.2 Building the Projects 
    8383 
    84    6. Using PJPROJECT with Your Applications 
     84   6. Using PJPROJECT with Applications 
    8585 
    8686 
     
    93931. Getting the Source Code Distribution 
    9494     _________________________________________________________________ 
    95  
    96    Since all libraries are released under Open Source license, all source code 
    97    are available for your scrutinizing pleasure. 
    9895 
    9996   All libraries (PJLIB, PJLIB-UTIL, PJSIP, PJMEDIA, and PJMEDIA-CODEC) are 
     
    108105   Getting the released tarball is a convenient way to obtain stable version of 
    109106   PJPROJECT. The tarball may not contain the latest features or bug-fixes, but 
    110    normally it is considered more stable as it will be tested more rigorously 
    111    before it is released. 
    112  
    113    You    can    get    the    latest    released    tarball   from   the 
     107   normally it is considered more stable as each will be tested more rigorously 
     108   before released. 
     109 
     110   The   latest   released   tarball   can   be   downloaded   from   the 
    114111   http://www.pjsip.org/download.htm. 
    115112 
     
    118115     _________________________________________________________________ 
    119116 
    120    You can always get the most up-to-date version of the sources from the 
    121    Subversion trunk. However, please bear in mind that the sources in the 
    122    Subversion trunk may not be the most stable one. In fact, it may not even 
    123    compile for some particular targets, because of the time lag in the updating 
    124    process for all targets. Please consult the mailing list if you encounter 
    125    such problems. 
    126  
    127    Using Subversion also has benefits of keeping your source up to date with 
    128    the main PJ source tree and to track your changes made to your local copy, 
    129    if any. 
     117   PJPROJECT  Subversion  repository  will always contain the latest/most 
     118   up-to-date version of the sources. Normally the Subversion repository is 
     119   always kept in a "good" state. However, there's always a chance that things 
     120   break  and  the  tree  doesn't  build  correctly (particularly for the 
     121   "not-so-popular" targets), so please consult the mailing list should there 
     122   be any problems. 
     123 
     124   Using Subversion also has benefits of keeping the local copy of the source 
     125   up to date with the main PJ source tree and to easily track the changes made 
     126   to the local copy, if any. 
    130127 
    131128 
    132129What is Subversion 
    133130 
    134    Subversion is Open Source version control system similar to CVS. Subversion 
    135    homepage is in http://subversion.tigris.org/ 
     131   Subversion (SVN) is Open Source version control system similar to CVS. 
     132   Subversion homepage is in http://subversion.tigris.org/ 
    136133 
    137134 
    138135Getting Subversion Client 
    139136 
    140    Before you can download the PJ source files from pjsip.org SVN tree, you 
    141    need  to  install  a Subversion client. You can download binaries from 
    142    http://subversion.tigris.org/  and  follow the instructions there. 
    143    Subversion clients are available for Windows, Linux, MacOS X, and many more 
    144    platforms. 
     137   A Subversion (SVN) client is needed to download the PJ source files from 
     138   pjsip.org  SVN  tree.  SVN  client  binaries  can  be  downloaded from 
     139   http://subversion.tigris.org/, and the program should be available for 
     140   Windows, Linux, MacOS X, and many more platforms. 
    145141 
    146142 
    147143Getting the Source for The First Time 
    148144 
    149    Once Subversion client is installed, you can use these commands to initially 
     145   Once Subversion client is installed, we can use these commands to initially 
    150146   retrieve the latest sources from the Subversion trunk: 
     147 
     148 
    151149 
    152150   $ svn co http://svn.pjproject.net/repos/pjproject/trunk pjproject 
     
    154152 
    155153 
    156 Keeping Your Local Copy Up-to-Date 
    157  
    158    Once you have your local copy of the sources, you will want to keep your 
    159    local copy up to date by periodically synchronizing your source with the 
    160    latest revision from the Subversion trunk. The mailing list provides best 
    161    source of information about the availability of new updates in the trunk. 
    162  
    163    You can use these commands to synchronize your copy with the main trunk: 
     154Keeping The Local Copy Up-to-Date 
     155 
     156   Once sources have been downloaded, we can keep the local copy up to date by 
     157   periodically synchronizing the local source with the latest revision from 
     158   the  PJ's  Subversion  trunk. The mailing list provides best source of 
     159   information about the availability of new updates in the trunk. 
     160 
     161   To  update  the  local  copy  with the latest changes in the main PJ's 
     162   repository: 
     163 
     164 
    164165 
    165166   $ cd pjproject 
     
    169170Tracking Local and Remote Changes 
    170171 
    171    In general, it is not recommended to keep your local changes (to the library 
    172    source codes) for a long time, because the longer you keep your changes, the 
    173    more chances that your source will be out-of-sync with the main PJ source 
    174    tree (the trunk), because the trunk may be updated to support new features 
    175    or to fix some bugs. 
    176  
    177    The  best way to resolve this is to send your modification back to the 
    178    author, so that he can change the copy in the SVN trunk. 
    179  
    180172   To see what files have been changed locally: 
     173 
     174 
    181175 
    182176   $ cd pjproject 
     
    184178 
    185179   The above command only compares local file against the original local copy, 
    186    so it doesn't require Internet connection to perform the check. 
    187  
    188    To see what files have been changed both locally and remotely: 
     180   so it doesn't require Internet connection while performing the check. 
     181 
     182   To see both what files have been changed locally and what files have been 
     183   updated in the PJ's Subversion repository: 
     184 
     185 
    189186 
    190187   $ cd pjproject 
    191188   $ svn status -u 
    192189 
    193    Note that svn status -u requires Internet connection to the SVN tree. 
     190   Note that this command requires active Internet connection to query the 
     191   status of PJPROJECT's source repository. 
    194192 
    195193 
     
    199197Top-Level Directory Layout 
    200198 
    201    The top-level directories (denoted as $PJ here) in the source distribution 
    202    contains the sources of individual libraries: 
    203  
    204    $PJ/build 
     199   The top-level directories (denoted as $TOP here) in the source distribution 
     200   contains the following sub-directories: 
     201 
     202   $TOP/build 
    205203          Contains makefiles that are common for all projects. 
    206204 
    207    $PJ/pjlib 
    208           Contains PJLIB header and source files. 
    209  
    210    $PJ/pjlib-util 
    211           Contains PJLIB-UTIL header and source files. 
    212  
    213    $PJ/pjmedia 
    214           Contains PJMEDIA and PJMEDIA-CODEC header and source files. 
    215  
    216    $PJ/pjsip 
     205   $TOP/pjlib 
     206          Contains  header  and  source files of PJLIB. PJLIB is the base 
     207          portability  and  framework  library which is used by all other 
     208          libraries 
     209 
     210   $TOP/pjlib-util 
     211          Contains  PJLIB-UTIL  header and source files. PJLIB-UTIL is an 
     212          auxiliary library that contains utility functions such as scanner, 
     213          XML, STUN, MD5 algorithm, getopt() implementation, etc. 
     214 
     215   $TOP/pjmedia 
     216          Contains PJMEDIA and PJMEDIA-CODEC header and source files. The 
     217          sources of various codecs (such as GSM, Speex, and iLBC) can be found 
     218          under this directory. 
     219 
     220   $TOP/pjsip 
    217221          Contains PJSIP header and source files. 
    218222 
    219    $PJ/pjsip-apps 
    220           Contains source code for PJSUA and samples applications. 
     223   $TOP/pjsip-apps 
     224          Contains source code for PJSUA and various sample applications. 
    221225 
    222226 
    223227Individual Directory Inside Each Project 
    224228 
    225    The directories inside each project (for example, inside pjlib, pjmedia, or 
    226    pjsip) further contains some sub-directories below: 
     229   Each library directory further contains these sub-directories: 
    227230 
    228231   bin 
    229           Contains binaries produced by the build process. The contents of this 
    230           directory will not get synchronized with the SVN trunk. 
     232          Contains binaries produced by the build process. 
    231233 
    232234   build 
     
    239241   build/output 
    240242          The build/output directory contains the object files and other files 
    241           generated by the build process. 
     243          generated by the build process. To support building multiple targets 
     244          with a single source tree, each build target will occupy a different 
     245          subdirectory under this directory. 
    242246 
    243247   build/wince-evc4 
     
    245249          CE/WinCE version of the project using Microsoft Embedded Visual C++ 
    246250          4. 
     251 
     252   build/wince-evc4/output 
     253          This directory contains the library, executable, and object files 
     254          generated by Windows Mobile build process. 
    247255 
    248256   docs 
     
    252260          the HTML files). 
    253261 
     262          (to generate Doxygen documentation from the source tree, just run 
     263          "doxygen docs/doxygen.cfg" in the individual project directory. The 
     264          generated files will reside in docs directory). 
     265 
    254266   include 
    255267          Contains the header files for the project. 
     
    268280     _________________________________________________________________ 
    269281 
    270    Before you can compile and use the libraries, you need to create your 
    271    config_site.h MANUALLY. 
    272  
    273    (Sorry to write in red background, but this question comes out quite often 
    274    so I thought it's worth to put some punctuation) 
    275  
    276 Q: What is config_site.h File 
    277  
    278    The pjlib/include/pj/config_site.h contains your local customizations to the 
     282   The pjlib/include/pj/config_site.h contains local customizations to the 
    279283   libraries. 
    280284 
    281 Q: Why do we need config_site.h file 
    282  
    283    You should put your customization in this file instead of modifying PJ's 
    284    files,  because  if you modify PJ's files, then you will prevent those 
    285    modified files from being updated next time you synchronize your local copy 
    286    to the SVN trunk. Or even worse, you may accidently overwrite your local 
    287    modification with the fresh copy from the SVN. 
    288  
    289    Putting your local customization to the config_site.h solves this problem, 
    290    because this file is not included in the version control. 
    291  
    292 Q: What customizations can be put in config_site.h file 
    293  
    294    You  can  put  your  #define macros in this file. You can find list of 
    295    configuration macros that you can override by scanning: 
     285   All customizations should be put in this file instead of modifying PJ's 
     286   files, because if PJ's files get modified, then those modified files will 
     287   not be updated the next time the source is synchronized. Or in other case, 
     288   the local modification may be overwritten with the fresh copy from the SVN. 
     289 
     290   Putting the local customization to the config_site.h solves this problem, 
     291   because this file is not included in the version control, so it will never 
     292   be overwritten by "svn update" command. 
     293 
     294   Please find list of configuration macros that can be overriden from these 
     295   files: 
    296296     * pjlib/config.h file 
    297297     * pjmedia/config.h file 
    298298     * pjsip/sip_config.h file 
    299299 
    300    You    can    also    see    a    sample    config_site.h    file   in 
     300   A     sample    config_site.h    file    is    also    available    in 
    301301   pjlib/include/config_site_sample.h. 
    302302 
    303 Q: How to create config_site.h file 
    304  
    305    The simplest way is just to create an empty file. 
    306  
    307    Another way to create your config_site.h is to write something like this: 
     303 
     304Creating config_site.h file 
     305 
     306   The simplest way is just to create an empty file, to use whetever default 
     307   values set by the libraries. 
     308 
     309   Another way to create the config_site.h file is to write something like the 
     310   following: 
     311 
    308312 
    309313   // Uncomment to get minimum footprint (suitable for 1-2 concurrent calls 
     
    318322     _________________________________________________________________ 
    319323 
    320    PJ will need 
    321    currently about 50-60 MB of disk space to store the source files, and 
    322      * approximately 30-50 MB of additional space for building each target 
    323  
    324    (For example, Visual Studio Debug and Release are considered to be separate 
    325    targets, so you'll need twice the capacity to build both of them) 
     324   The building process needs: 
     325     * about 50-60 MB of disk space to store the uncompressed source files, and 
     326     * about 30-50 MB of additional space for building each target 
     327 
     328   (Visual Studio Debug and Release are considered as separate targets) 
    326329 
    327330 
     
    337340     * MacOS X (PowerPC), 
    338341     * mingw (i386), 
    339      * *BSD (i386, Opteron, etc.), 
    340      * RTEMS (ARM, powerpc), 
     342     * FreeBSD and maybe other BSD's (i386, Opteron, etc.), 
     343     * RTEMS with cross compilation (ARM, powerpc), 
    341344     * etc. 
    342345 
     
    345348     _________________________________________________________________ 
    346349 
    347    To use PJ's GNU build system, you would need the typical GNU tools such as: 
    348      * GNU Make (other make will not work), 
    349      * binutils, 
    350      * gcc, and 
    351      * sh compatible shell (for autoconf to work) 
    352  
    353    On Windows, mingw will work, but cygwin currently doesn't. As usual, your 
    354    mileage may vary. 
     350   In order to use PJ's GNU build system, these typical GNU tools are needed: 
     351     * GNU make (other make will not work), 
     352     * GNU binutils for the target, and 
     353     * GNU gcc for the target. 
     354 
     355   In addition, the appropriate "SDK" must be installed for the particular 
     356   target (this could just be a libc and the appropriate system abstraction 
     357   library such as Posix). 
     358 
     359   The build system is known to work on the following hosts: 
     360     * Linux, many types of distributions. 
     361     * MacOS X 10.2 
     362     * mingw (Win2K, XP) 
     363     * FreeBSD (must use gmake instead of make) 
     364 
     365   Building Win32 applications with cygwin is currently not supported (there is 
     366   some Windows header conflicts), but cross-compilations might just work. 
    355367 
    356368 
     
    360372Using Default Settings 
    361373 
    362    Just  run  configure  without any options to let the script detect the 
     374   Run  "./configure"  without  any options to let the script detect the 
    363375   appropriate settings for the host: 
     376 
     377 
    364378 
    365379   $ cd pjproject 
     
    368382 
    369383   Notes: 
    370           The  default settings build the library in "release" mode, with 
    371           default CFLAGS set to "-O2 -DNDEBUG". 
     384          The default settings build the libraries in "release" mode, with 
     385          default CFLAGS set to "-O2 -DNDEBUG". To change the default CFLAGS, 
     386          we can use the usual "./configure CFLAGS='-g'" construct. 
    372387 
    373388    Features Customization 
    374389 
    375390   With the new autoconf based build system, most configuration/customization 
    376    can  be  specified  as  configure  arguments.  You can get the list of 
    377    customizable features by running ./configure --help: 
     391   can be specified as configure arguments. The list of customizable features 
     392   can be viewed by running "./configure --help" command: 
     393 
     394 
    378395 
    379396   $ cd pjproject 
     
    394411   ...                        
    395412 
    396     Debug Version and Other Customizations 
    397  
    398    The configure script accepts standard customization such as the CFLAGS, 
    399    LDFLAGS, etc. 
     413    Configuring Debug Version and Other Customizations 
     414 
     415   The configure script accepts standard customization, which details can be 
     416   obtained by executing ./configure --help. 
    400417 
    401418   For example, to build the libraries/application in debug mode: 
     419 
     420 
    402421 
    403422   $ ./configure CFLAGS="-g" 
     
    410429   (.. to be completed) 
    411430 
     431 
     432 
    412433   $ ./configure --target=powerpc-linux-unknown 
    413434   ... 
     
    419440   Once the configure script completes successfully, start the build process by 
    420441   invoking these commands: 
     442 
     443 
    421444 
    422445   $ cd pjproject 
     
    425448 
    426449   Note: 
    427           You may need to call gmake instead of make for your host to invoke 
    428           GNU make instead of the native make. 
     450          gmake may need to be specified instead of make for some hosts, to 
     451          invoke GNU make instead of the native make. 
     452 
    429453 
    430454   Description of all make targets supported by the Makefile's: 
    431455 
    432456   all 
    433           The default (or first) make target to build the libraries/binaries. 
     457          The default (or first) target to build the libraries/binaries. 
    434458 
    435459   dep, depend 
     
    437461 
    438462   clean 
    439           Clean the object files, but keep the output library/binary files 
    440           intact. 
     463          Clean  the object files for current target, but keep the output 
     464          library/binary files intact. 
    441465 
    442466   distclean, realclean 
    443           Clean  all  generated  files (object, libraries, binaries, and 
    444           dependency files). 
     467          Remove  all  generated  files (object, libraries, binaries, and 
     468          dependency files) for current target. 
    445469 
    446470 
    447471   Note: 
    448           You can run make in the top-level PJ directory or in build directory 
    449           under each project to build only the particular project. 
     472          make can be invoked either in the top-level PJ directory or in build 
     473          directory under each project to build only the particular project. 
    450474 
    451475 
     
    456480     _________________________________________________________________ 
    457481 
    458    In order to build the projects using Microsoft Visual Studio, you need to 
    459    have one of the following: 
     482   The Microsoft Visual Studio based project files can be used with one of the 
     483   following: 
    460484 
    461485     * Microsoft Visual Studio 6, 
    462486     * Microsoft Visual Studio .NET 2002, 
    463487     * Microsoft Visual Studio .NET 2003, 
    464      * Microsoft Visual Studio Express 2005 with Platform SDK and DirectX SDK, 
    465  
    466    For the host, you need: 
    467      * Windows NT, 2000, XP, 2003, or later (it may work on Windows 95 or 98, 
    468        but this has not been tested), 
    469      * Sufficient amount of RAM for the build process, 
     488     * Microsoft Visual C++ Express 2005 with Platform SDK and DirectX SDK, 
     489 
     490   For the host, the following are required: 
     491     * Windows NT, 2000, XP, 2003, or later , 
     492     * Windows 95/98 should work too, but this has not been tested, 
     493     * Sufficient amount of RAM for the build process. 
    470494 
    471495 
     
    476500   Studio: 
    477501    1. Open Visual Studio 6 workspace file pjsip-apps/build/pjsip_apps.dsw. If 
    478        you're using later version of Visual Studio, it should convert the 
     502       later version of Visual Studio is being used, it should convert the 
    479503       workspace file and project files into the new formats. 
    480504    2. Set pjsua as Active Project. 
     
    509533    2. Set sample_debug project as Active Project 
    510534    3. Edit debug.c file inside this project. 
    511     4. Modify the #include line to include the particular sample application 
    512        you want to debug 
     535    4. Modify the #include line to include the particular sample application to 
     536       debug 
    513537    5. Select Debug build. 
    514538    6. Build and debug the project. 
     
    525549     _________________________________________________________________ 
    526550 
    527    You will need the following to build SIP and media components for Windows 
    528    Mobile: 
     551   One of the following development tools is needed to build SIP and media 
     552   components for Windows Mobile: 
    529553     * Microsoft Embedded Visual C++ 4 with appropriate SDKs, or 
    530554     * Microsoft Visual Studio 2005 for Windows Mobile with appropriate SDKs. 
    531555 
    532556   Note that VS2005 is not directly supported (as I don't have the tools), but 
    533    it is reported to work (and I assumed that VS2005 for Windows Mobile can 
    534    import EVC4 workspace file). 
     557   it is reported to work (I assumed that VS2005 for Windows Mobile can import 
     558   EVC4 workspace file). 
    535559 
    536560  5.2 Building the Projects 
     
    541565   application: 
    542566    1. Open pjsip-apps/build/wince-evc4/wince_demos.vcw workspace file. If 
    543        you're using later version of EVC4 this may cause the workspace file to 
    544        be converted to the current version of your Visual Studio. 
     567       later version of EVC4 is being used, this may cause the workspace file 
     568       to be converted to the appropriate format. 
    545569    2. Select pjsua_wince project as the Active Project. 
    546570    3. Select the appropriate SDK (for example Pocket PC 2003 SDK or SmartPhone 
    547571       2003 SDK) 
    548572    4. Select the appropriate configuration (for example, Win32 (WCE Emulator 
    549        Debug) if you plan to debug the program in emulator) 
     573       Debug) to debug the program in emulator, or other configurations such as 
     574       ARMV4, MIPS, SH3, SH4, or whatever suitable for the device) 
    550575    5. Select the appropriate device (Emulator or the actual Device). 
    551576    6. Build the project. This will build the sample WinCE application and all 
     
    553578 
    554579   Notes 
    555           If your config_site.h includes config_site_sample.h file, then 
    556           there are certain configuration in config_site_sample.h that get 
    557           activated for Windows CE targets. 
    558  
    559  
    560 6. Using PJPROJECT with Your Applications 
    561      _________________________________________________________________ 
    562  
    563    Regardless if you use Visual Studio or GNU build systems or other tools, in 
    564    order to build your application to use PJSIP and PJMEDIA SIP and media 
    565    stack, you need to configure your build tools as follows: 
    566     1. Put these include directories in your include search path: 
     580 
     581          + If the config_site.h includes config_site_sample.h file, then 
     582            there are certain configuration in config_site_sample.h that get 
     583            activated for Windows CE targets. Please make sure that these 
     584            configurations are suitable for the application. 
     585          + The libraries, binaries and object files produced by the build 
     586            process are located under build/wince-evc4/output directory of each 
     587            projects. 
     588 
     589 
     5906. Using PJPROJECT with Applications 
     591     _________________________________________________________________ 
     592 
     593   Regardless of the build system being used, the following tasks are normally 
     594   needed to be done in order to build application to use PJSIP and PJMEDIA: 
     595    1. Put these include directories in the include search path: 
    567596          + pjlib/include 
    568597          + pjlib-util/include 
    569598          + pjmedia/include 
    570599          + pjsip/include 
    571     2. Put these library directories in your library search path: 
     600    2. Put these library directories in the library search path: 
    572601          + pjlib/lib 
    573602          + pjlib-util/lib 
    574603          + pjmedia/lib 
    575604          + pjsip/lib 
    576     3. Include the relevant PJ header files in your application source file. 
    577        For example, using these would include ALL APIs exported by PJ: 
     605    3. Include the relevant PJ header files in the application source file. For 
     606       example, using these would include ALL APIs exported by PJ: 
    578607 
    579608      #include <pjlib.h> 
     
    588617       header files should be included to get the declaration of the APIs). 
    589618    4. Declare the OS macros. 
    590           + For Windows applications built with Visual Studio, you need to 
    591             declare PJ_WIN32=1 macro in your project settings (declaring the 
    592             macro in your source file may not be sufficient). 
    593           + For Windows Mobile applications build with Visual C++, you need to 
    594             declare PJ_WIN32_WINCE=1 macro in your project settings. 
    595           + For GNU build system/autoconf based build system, you need to 
    596             declare PJ_AUTOCONF=1 macro when compiling your applications. 
     619          + For Windows applications built with Visual Studio, we need to 
     620            declare PJ_WIN32=1 macro in the project settings (declaring the 
     621            macro in the source file may not be sufficient). 
     622          + For Windows Mobile applications build with Visual C++, we need to 
     623            declare PJ_WIN32_WINCE=1 macro in the project settings. 
     624          + For  GNU build system/autoconf based build system, we need to 
     625            declare PJ_AUTOCONF=1 macro when compiling the applications. 
    597626       (Note: the old PJ build system requires declaring the target processor 
    598627       with PJ_M_XXX=1 macro, but this has been made obsolete. The target 
     
    600629       pjlib/config.h file). 
    601630    5. Link with the appropriate PJ libraries. The following libraries will 
    602        need to be included in your library link specifications: 
     631       need to be included in the library link specifications: 
    603632 
    604633        pjlib 
     
    638667                The actual library names will look like 
    639668                pjlib-i386-win32-vc6-debug.lib, 
    640                 pjlib-i386-win32-vc6-release.lib, etc., depending on whether 
    641                 you build the Debug or Release version of the library. 
     669                pjlib-i386-win32-vc6-release.lib, etc., depending on whether we 
     670                are building the Debug or Release version of the library. 
     671 
     672                An easier way to link with the libraries is to include PJ 
     673                project files in the workspace, and to configure project 
     674                dependencies so that the application depends on the PJ 
     675                libraries. This way, we don't need to manually add each PJ 
     676                libraries to the input library file specification, since VS 
     677                will automatically link the dependency libraries with the 
     678                application. 
     679 
     680        For Windows Mobile builds 
     681                Unfortunately the PJ libraries built for Windows Mobile will 
     682                not be placed in the usual lib directory, but rather under the 
     683                output directory under build/wince-evc4 project directory. 
     684 
     685                An easier way to link with the libraries is to include PJ 
     686                project files in the workspace, and to configure project 
     687                dependencies so that the application depends on the PJ 
     688                libraries. This way, we don't need to manually add each PJ 
     689                libraries to the input library file specification, since VS 
     690                will automatically link the dependency libraries with the 
     691                application. 
    642692 
    643693        For GNU builds 
    644                 You can get the library suffix by including PJ's build.mak file 
    645                 from the root PJ directory (the suffix is contained in 
    646                 TARGET_NAME variable). For example, to link with PJLIB and 
    647                 PJMEDIA, you can use this in syntax your LDFLAGS: 
    648                 "-lpj-$(TARGET_NAME) -lpjmedia-$(TARGET_NAME)" 
    649  
    650    Should you encounter any difficulties with using PJ libraries, you can 
    651    consult the mailing list for some help. 
     694                Application's Makefile can get the PJ library suffix by 
     695                including PJ's build.mak file from the root PJ directory (the 
     696                suffix is contained in TARGET_NAME variable). For example, to 
     697                link with PJLIB and PJMEDIA, we can use this syntax in the 
     698                LDFLAGS: "-lpj-$(TARGET_NAME) -lpjmedia-$(TARGET_NAME)" 
    652699 
    653700 
     
    658705  file or directory 
    659706 
    660    If  you  encounter  this  error, then probably you haven't created the 
    661    config_site.h file. Please follow the Build Preparation instructions 
    662    above to create this file. 
    663  
    664  
    665  
    666  
    667  
    668  
    669  
    670  
    671      _________________________________________________________________ 
    672  
    673    Feedback: 
    674           Thanks for downloading PJ libraries and for reading this document. If 
    675           you'd like to comment on anything, send your email to me and I would 
    676           be delighted to hear them. -benny <bennylp at pjsip dot org> 
    677  
     707   This error normally occurs when the config_site.h file has not been created. 
     708   This file needs to be created manually (an empty file is sufficient). Please 
     709   follow the Build Preparation instructions above to create this file. 
     710 
     711 
     712 
     713 
     714 
     715  Thanks for using PJ libraries and for reading this document. Please 
     716  send feedbacks or general comments to <bennylp at pjsip dot org>. 
     717 
     718  Benny Prijono 
     719 
Note: See TracChangeset for help on using the changeset viewer.