[pjsip] Building pjsua as DLL

Tomás Valenta vali at kamarad.cz
Tue Nov 13 08:51:16 EST 2007

Hi Benny,

I am reporting some problems with building pjsua as DLL in Visual Studio 8.
In VS8 solution I declare macros PJ_DLL and PJ_EXPORTING in projects whose
functions I want to use (e.g. pjlib, pjmedia and pjsua-lib). In project
pjsua-lib I set output as DLL. Macros PJ_EXPORT_DECL_SPECIFIER etc. are
automaticaly defined in cc_msvc.h.

First problem:
In the solution there are no depencies on other projects so the projects
won't be built and linked. I had to set the depencies manually to the same
ones as in pjsua app.

Second problem:
See following compiler error:

c:\pjproject-0.8.0\pjlib\src\pj\except.c(41) : error C2375:
'pj_throw_exception_' : redefinition; different linkage
c:\pjproject-0.8.0\pjlib\include\pj\except.h(302) : see declaration of

I don't know exactly what it means but commenting out the line
//#define PJ_EXPORT_DEF_SPECIFIER     __declspec(dllexport)
in cc_msvc.h solves the problem.

Have a nice day.

More information about the pjsip mailing list