[pjsip] Win32 build doesn't build because of stddef.h

Eagle I Martin Baranski eagle3386 at googlemail.com
Thu Nov 8 10:39:39 EST 2007

2007/11/8, Perry Ismangil <perry at pjsip.org>:
> On 11/8/07, Eagle I Martin Baranski <eagle3386 at googlemail.com> wrote:
> >
> > Alright, got the checkout done. What next? :)
> Well, describe what you do to try to compile it in Code::Blocks. And then
> post any errors here. I know you have posted some errors before but we're
> not clear on the steps you have taken to reach it.
> Cheers,

Nothing easier than that..

At first, I rename the "config_site_sample.h" within the path
"pjlib\include\pj" to "config_site.h".

Then, I launch Code::Blocks (the devs their suggest using the latest
SVN-build, others won't work under Vista and are totally outdated),
open the "pjproject-vs8.sln"-file and then click 2 times "Yes",
because I want to compile PJSIP with my default set compiler and all
configuration data shall be imported.

After some waiting, I single-click the "pjsua"-item within the
project-management-tree at the left, choose "Debug Win32" from the
drop-down menu above the project-management, then a right-click at the
"pjsua"-item and a left-click at the context-menu-option called

So, the building goes and and soon will fail and then, the message-box
at the bottom will jump to the "Build messages"-tab. But because I
want the whole log, I click the "Build log"-tab and the box then gives

-------------- Build: Debug Win32 in pjsua ---------------
[ 33.3%] mingw32-c++.exe  -D_DEBUG -DPJ_WIN32=1 -DPJ_M_I386=1 -DWIN32
-D_CONSOLE -Wall -g -O0  -march=athlon64 -O2 -O1 -O -Wmain -Wall
-I..\..\pjsip\include -I..\..\pjlib\include -I..\..\pjlib-util\include
-I..\..\pjmedia\include -I..\..\pjnath\include -IC:\MinGW\include
-IC:\MinGW\include\c++\3.4.5 -IC:\MinGW\include\c++\3.4.5\backward
-IC:\MinGW\lib\gcc\mingw32\3.4.5\include -I"C:\Program
Files\System\Platform SDK\Windows\Include"
-IM:\pj-sip\pjsip-apps\src\pjsua -IM:\pj-sip\pjsip-apps -c
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c -o
cc1plus.exe: warning: command line option "-Wmain" is valid for C/ObjC
but not for C++
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c: In function `int
read_config_file(pj_pool_t*, const char*, int*, char***)':
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:256: error: invalid
conversion from `void*' to `char**'
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:317: error: invalid
conversion from `void*' to `char*'
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c: In function `void
M:\pj-sip\pjsip-apps\src\pjsua\pjsua_app.c:2257: warning: comparison
between signed and unsigned integer expressions
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 2 warnings

And that's all, the compiler says to me..
But to get that far, I had to add some stuff to the compiler settings,
which I'm going to describe for you now (I'm assuming you've installed
MinGW directly below the "C:\"-root because of problems between Vista
and MinGW when using long pathnames):

Click "Settings" -> "Compiler and debugger..." -> "#defines"-tab (make
sure, the selected compiler is set to "GNU GCC Compiler") -> enter the
following into the box:


Then, click the "Toolchain"-tab -> "Auto-detect" (make sure, the path
to the left does NOT contain "\bin", e. g. "C:\MinGW", NOT

Afterwards, click the "Additional Paths"-tab -> add

After that, click the "Search directories"-tab, and below the
"Compiler"-sub-tab, there should be the following:

C:\Program Files\System\Platform SDK\Windows\Include

Same goes for the "Linker"-sub-tab:


And the "Resource"-sub-tab has just this:


Finally, click that tiny little arrow pointing to the right in the
upper window-part to get to the "Other settings"-tab. There, set the

Compiler logging: Full command line
Check both entries starting with "Explicitely add..." and also both
entries starting with "Display build".

That's it - click OK and then that tiny blue gear at the upper-left window-part.
= ~ Code is poetry ~
= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386 at gmail.com
= +49 (0)160 93317843

More information about the pjsip mailing list