Adding projects necessary to build pjsip and use from C# - Windows, Windows Phone, Xamarin/iOS, Xamarin/Android
C C++ C# Python Shell Objective-C Other
Switch branches/tags
Nothing to show
Clone or download
Latest commit 9cdb856 Aug 18, 2014
Permalink
Failed to load latest commit information.
Backup Initial commit Aug 8, 2014
_UpgradeReport_Files Initial commit Aug 8, 2014
build.symbian Initial commit Aug 8, 2014
build Initial commit Aug 8, 2014
doc/pjsip-book Initial commit Aug 8, 2014
pjlib-util Debug build of DLL Aug 16, 2014
pjlib Debug build of DLL Aug 16, 2014
pjmedia Debug build of DLL Aug 16, 2014
pjnath Debug build of DLL Aug 16, 2014
pjsip-apps Debug build of DLL Aug 16, 2014
pjsip Debug build of DLL Aug 16, 2014
pjsua2 Debug build of DLL Aug 16, 2014
pjsua2_net Debug build of DLL Aug 16, 2014
tests Initial commit Aug 8, 2014
third_party Debug build of DLL Aug 16, 2014
.gitignore Debug build of DLL Aug 16, 2014
COPYING Initial commit Aug 8, 2014
INSTALL.txt Initial commit Aug 8, 2014
Makefile Initial commit Aug 8, 2014
README-RTEMS Initial commit Aug 8, 2014
README.txt Updated readme's Aug 18, 2014
README_ORIGINAL.txt Updated readme's Aug 18, 2014
UpgradeLog.XML Debug build of DLL Aug 16, 2014
UpgradeLog.htm Initial commit Aug 8, 2014
aconfigure Initial commit Aug 8, 2014
aconfigure.ac Initial commit Aug 8, 2014
bb10-config.mak Initial commit Aug 8, 2014
build.mak.in Initial commit Aug 8, 2014
c++-build.mak Initial commit Aug 8, 2014
config.guess Initial commit Aug 8, 2014
config.sub Initial commit Aug 8, 2014
configure Initial commit Aug 8, 2014
configure-android Initial commit Aug 8, 2014
configure-bb10 Initial commit Aug 8, 2014
configure-iphone Initial commit Aug 8, 2014
configure-legacy Initial commit Aug 8, 2014
install-sh Initial commit Aug 8, 2014
libpjproject.pc.in Initial commit Aug 8, 2014
pjproject-vs8.sdf Debug build of DLL Aug 16, 2014
pjproject-vs8.sln Debug build of DLL Aug 16, 2014
pjproject-vs8.v11.suo Debug build of DLL Aug 16, 2014
pkgconfig.py Initial commit Aug 8, 2014
self-test.mak Initial commit Aug 8, 2014
svn_add Initial commit Aug 8, 2014
svn_add.bat Initial commit Aug 8, 2014
svn_pset Initial commit Aug 8, 2014
svn_pset.bat Initial commit Aug 8, 2014
user.mak.sample Initial commit Aug 8, 2014
version.mak Initial commit Aug 8, 2014

README.txt

README PJSIP CSHARP

This is a work in progress.

My goal is to create C# wrappers for PJSIP such that it can be used on Windows as well as Xamarin - Android/iOS.

The first step is to produce a stand along PJSIP windows dll. For that I used Mike G's comments as a starting point.

   https://github.com/siniypin/pjsip4net/issues/15

Here is my updated set of instructions for getting PJSIP to compile on Windows. 

1) Create a new project. (I named it PJSUA2, and it is checked in.)
2) Install SWIG. (I used version 3.0) and had to add it to the system environment variables so I could execute it in the cmd window.

   http://www.swig.org/

3) Create a csharp directory off of the pjsip-apps\src\swig directory.
4) In that directory execute:

```
swig -I../../../../pjlib/include -I../../../../pjlib-util/include -I../../../../pjmedia/include -I../../../../pjsip/include -I../../../../pjnath/include -w312 -c++ -csharp -o pjsua2_wrap.cpp ../pjsua2.i
```

	The -c++ is important otherwise it produces c code which VS has problems with.
	
5) Create a new Win32 DLL project. Copy the produced .h and .cpp files into the new project. 
Then I updated the output directory, include files, lib search path and libs to: (In PJSUA2\properties [select ALL Configurations)

Output: (General -> Output Directory)

    .\output\$(ProjectName)-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(Configuration)\

C/C++ (C/C++\General -> Additional Include Directories)

    ..\pjsip\include;..\pjlib\include;..\pjlib-util\include;..\pjmedia\include;..\pjnath\include;%(AdditionalIncludeDirectories)

Additional Library Directories: (Linker\All Options -> Additional Library Directories)

    ..\pjsip\lib;..\pjlib-util\lib;..\pjlib\lib;..\pjnath\lib;..\pjmedia\lib;..\third_party\lib;%(AdditionalLibraryDirectories)
	
Then for Debug only so far, added these additional dependencies directly:

	pjsua-lib-i386-Win32-vc8-Debug-Dynamic.lib;
	pjsua2-lib-i386-Win32-vc8-Debug-Dynamic.lib;
	pjlib-i386-Win32-vc8-Debug-Dynamic.lib;
	pjlib-util-i386-Win32-vc8-Debug-Dynamic.lib;
	pjsip-core-i386-Win32-vc8-Debug-Dynamic.lib;
	pjnath-i386-Win32-vc8-Debug-Dynamic.lib;
	pjmedia-i386-Win32-vc8-Debug-Dynamic.lib;
	pjmedia-audiodev-i386-Win32-vc8-Debug-Dynamic.lib;
	pjsip-simple-i386-Win32-vc8-Debug-Dynamic.lib;
	pjsip-ua-i386-Win32-vc8-Debug-Dynamic.lib;
	libspeex-i386-Win32-vc8-Debug-Dynamic.lib;
	pjmedia-codec-i386-Win32-vc8-Debug-Dynamic.lib;
	libsrtp-i386-Win32-vc8-Debug-Dynamic.lib;
	libgsmcodec-i386-Win32-vc8-Debug-Dynamic.lib;
	libresample-i386-Win32-vc8-Debug-Dynamic.lib;
	libilbccodec-i386-Win32-vc8-Debug-Dynamic.lib;
	Ws2_32.lib;

I added those names to the debug configuration since I couldn't get the VC macros to match up exactly. I think it can be done, but would just take some time.

Then I set the dependencies on the projects for the above lib files and set the active configuration to Debug-Dynamic so it would pull in the right VC libs.

6) Created a new C# library project. I called it pjsua2_net and added all the cs files created from step 4.
7) Set pjsua2 as its dependency.

That is as far as I've gotten at this point. I'm looking for help to verify the steps above and continue.

All my projects & work are checked for how far I've gotten. That is, all the above steps applied to PJSIP.