How to build pjsip as DLL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I managed to build pjsua.dll some time ago and wrote down a simple 
how-to. Maybe you will be lucky with that. It is in doxygen:

@subsubsection subsubsec-pjsip-1x Building PJSIP version 1.x
-# Download sources from http://www.pjsip.org/.
-# Open solution in Visual Studio.
	If you use VS2010 (and maybe newer), do not open the @c .sln file, but
	@c .dsw file for older Visual C++ since it does not contain mobile targets
	preventing from import.
-# Create empty file @c pjlib/include/pj/config_site.h
	or copy it from @c config_site_sample.h and add following code:
@code
#define PJ_DLL  1
#ifdef _LIB
#	define PJ_EXPORTING 1
#endif
@endcode
	This will build PJProject using shared libraries.
-# Choose configuration according to your needs: statically or dynamically
	linked release or debug LIBC. Recommended: <b>Release-Dynamic</b>. Do 
not forget
	to set Win32 platform.
-# At project @c pjsua_lib, set Configuration type to DLL and check 
dependencies
	to the same values as in @c libpjproject.
	Add @c ws2_32.lib into linker input libraries. Put @c 
_pjmedia_tonegen_create2
	into Linker > Input > Force Symbol References and
	@c pjsua_lib.dll into Linker > General > Output file.
	(Otherwise some symbols would not be exported... ask me why.)
-# Build @c pjsua_lib.
-# Copy @c .lib and @c .dll from @c pjsip/bin to @c 
your/location/sip/pjsua_lib.lib
	and @c pjsua_lib.dll. Note that @c .dll may have @c .exe extension by 
mistake.
-# Copy (merge) all contents of @c include directories of projects
	@c pjlib, @c pjlib-util, @c pjmedia, @c pjnath, @c pjsip into
	@c your/location/sip/include.

Process to build branch 2.x should be similar I guess, but there is no 
.dsw any more. I can provide you with a PHP script that removes mobile 
targets from .sln and .vcproj files which are then readable by Visual 
Studio, even 2010.

Good luck!
- Vali


Dne 25.2.2013 14:04, Trent Creekmore napsal(a):
> Good luck with that. I tried building it before and got errors also.
>
> Also got no response on the issue just like you.
>
> *From:*pjsip [mailto:pjsip-bounces at lists.pjsip.org] *On Behalf Of *Khoa Pham
> *Sent:* Thursday, February 21, 2013 5:09 AM
> *To:* pjsip list
> *Subject:* [pjsip] How to build pjsip as DLL
>
> Hi,
>
> I follow the instructions here
>
> http://www.pjsip.org/pjlib/docs/html/group__pj__dll__target.htm
>
> I do the following step
>
> 1. Reset libpjproject to DLL (in Project properties -> Configurations
> properties -> General)
>
> 2. Define macro in config_site.h
>
> #define PJ_DLL 1
>
> #define PJ_EXPORTING 1
>
> #define PJ_EXPORT_SPECIFIER  __declspec(dllexport)
>
> #define PJ_IMPORT_SPECIFIER  __declspec(dllimport)
>
> But I received many errors. Did I do wrong ?
>
> How to build pjsip as DLL ?
>
> --
> Khoa Pham
> HCMC University of Science
> Faculty of Information Technology
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux