Changeset 1595


Ignore:
Timestamp:
Nov 23, 2007 3:49:20 AM (12 years ago)
Author:
bennylp
Message:

Added information about building pjsip as DLL in the doxygen documentation

Location:
pjproject/trunk/pjlib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/docs/doxygen.cfg

    r1410 r1595  
    378378# certain files from those directories. 
    379379 
    380 EXCLUDE_PATTERNS       = "*_i.h" "*/compat/*" 
     380EXCLUDE_PATTERNS       = "*_i.h" "*/compat/*" "*/config_site.h" 
    381381 
    382382# The EXAMPLE_PATH tag can be used to specify one or more files or  
  • pjproject/trunk/pjlib/include/pj/config.h

    r1585 r1595  
    661661#endif 
    662662 
    663  
    664663/** @} */ 
    665664 
     
    669668 
    670669/** 
    671  * Guide for building dynamic link libraries (DLL). 
     670 * @defgroup pj_dll_target Building Dynamic Link Libraries (DLL/DSO) 
     671 * @ingroup pj_config 
     672 * @{ 
    672673 * 
    673674 * The libraries support generation of dynamic link libraries for 
    674  * Symbian ABIv2 target (.dso files, in S60 3rd Edition). Similar 
    675  * procedures may be applied for Win32 DLL too, with some modification. 
     675 * Symbian ABIv2 target (.dso/Dynamic Shared Object files, in Symbian 
     676 * terms). Similar procedures may be applied for Win32 DLL with some  
     677 * modification. 
     678 * 
     679 * Depending on the platforms, these steps may be necessary in order to 
     680 * produce the dynamic libraries: 
     681 *  - Create the (Visual Studio) projects to produce DLL output. PJLIB 
     682 *    does not provide ready to use project files to produce DLL, so 
     683 *    you need to create these projects yourself. For Symbian, the MMP 
     684 *    files have been setup to produce DSO files for targets that  
     685 *    require them. 
     686 *  - In the (Visual Studio) projects, some macros need to be declared 
     687 *    so that appropriate modifiers are added to symbol declarations 
     688 *    and definitions. Please see the macro section below for information 
     689 *    regarding these macros. For Symbian, these have been taken care by the 
     690 *    MMP files. 
     691 *  - Some build systems require .DEF file to be specified when creating 
     692 *    the DLL. For Symbian, .DEF files are included in pjlib distribution, 
     693 *    in <tt>pjlib/build.symbian</tt> directory. These DEF files are  
     694 *    created by running <tt>./makedef.sh all</tt> from this directory, 
     695 *    inside Mingw. 
    676696 * 
    677697 * Macros related for building DLL/DSO files: 
    678698 *  - For platforms that supports dynamic link libraries generation, 
    679  *    it must declare PJ_EXPORT_SPECIFIER macro which value contains 
     699 *    it must declare <tt>PJ_EXPORT_SPECIFIER</tt> macro which value contains 
    680700 *    the prefix to be added to symbol definition, to export this  
    681701 *    symbol in the DLL/DSO. For example, on Win32/Visual Studio, the 
    682  *    value of this macro is "__declspec(dllexport)", and for ARM  
     702 *    value of this macro is \a __declspec(dllexport), and for ARM  
    683703 *    ABIv2/Symbian, the value is \a EXPORT_C.  
    684704 *  - For platforms that supports linking with dynamic link libraries, 
    685  *    it must declare PJ_IMPORT_SPECIFIER macro which value contains 
     705 *    it must declare <tt>PJ_IMPORT_SPECIFIER</tt> macro which value contains 
    686706 *    the prefix to be added to symbol declaration, to import this  
    687707 *    symbol from a DLL/DSO. For example, on Win32/Visual Studio, the 
    688  *    value of this macro is "__declspec(dllimport)", and for ARM  
     708 *    value of this macro is \a __declspec(dllimport), and for ARM  
    689709 *    ABIv2/Symbian, the value is \a IMPORT_C.  
    690  *  - When PJLIB is built as DLL/DSO, both \a PJ_DLL and \a PJ_EXPORTING 
    691  *    macros must be declared, so that PJ_EXPORT_SPECIFIER prefix will be 
    692  *    added into function definition. 
     710 *  - Both <tt>PJ_EXPORT_SPECIFIER</tt> and <tt>PJ_IMPORT_SPECIFIER</tt>  
     711 *    macros above can be declared in your \a config_site.h if they are not 
     712 *    declared by pjlib. 
     713 *  - When PJLIB is built as DLL/DSO, both <tt>PJ_DLL</tt> and  
     714 *    <tt>PJ_EXPORTING</tt> macros must be declared, so that  
     715 *     <tt>PJ_EXPORT_SPECIFIER</tt> modifier will be added into function 
     716 *    definition. 
    693717 *  - When application wants to link dynamically with PJLIB, then it 
    694  *    must declare \a PJ_DLL macro when using/including PJLIB header, 
    695  *    so that PJ_IMPORT_SPECIFIER is properly added into symbol 
    696  *    declarations. 
    697  * 
    698  * When \a PJ_DLL macro is not declared, static linking is assumed. 
     718 *    must declare <tt>PJ_DLL</tt> macro when using/including PJLIB header, 
     719 *    so that <tt>PJ_IMPORT_SPECIFIER</tt> modifier is properly added into  
     720 *    symbol declarations. 
     721 * 
     722 * When <b>PJ_DLL</b> macro is not declared, static linking is assumed. 
     723 * 
     724 * For example, here are some settings to produce DLLs with Visual Studio 
     725 * on Windows/Win32: 
     726 *  - Create Visual Studio projects to produce DLL. Add the appropriate  
     727 *    project dependencies to avoid link errors. 
     728 *  - In the projects, declare <tt>PJ_DLL</tt> and <tt>PJ_EXPORTING</tt>  
     729 *    macros. 
     730 *  - Declare these macros in your <tt>config_site.h</tt>: 
     731 \verbatim 
     732        #define PJ_EXPORT_SPECIFIER  __declspec(dllexport) 
     733        #define PJ_IMPORT_SPECIFIER  __declspec(dllimport) 
     734 \endverbatim 
     735 *  - And in the application (that links with the DLL) project, add  
     736 *    <tt>PJ_DLL</tt> in the macro declarations. 
     737 */ 
     738 
     739/** @} */ 
     740 
     741/** 
     742 * @defgroup pj_config Build Configuration 
     743 * @ingroup PJ 
     744 * @{ 
    699745 */ 
    700746 
     
    883929#define __pj_throw__(x) 
    884930 
     931/** @} */ 
    885932 
    886933/******************************************************************** 
Note: See TracChangeset for help on using the changeset viewer.