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

logan logan04x at gmail.com
Thu Nov 8 10:58:47 EST 2007


Hi,

It looks to me that CodeBlocks is trying to compile PJSIP as a C++ project, 
while it's a C project. Try to change the configurations so that it's 
compiled as C project.

Thanks.

Best Regards,
Hitesh

----- Original Message ----- 
From: "Eagle I Martin Baranski" <eagle3386 at googlemail.com>
To: "pjsip embedded/DSP SIP discussion" <pjsip at lists.pjsip.org>
Sent: Thursday, November 08, 2007 9:09 PM
Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h


> 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
> "Build".
>
> 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
> me:
>
> -------------- 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
> -DNDEBUG -DPJ_WIN32=1 -DPJ_M_I386=1 -DWIN32 -D_CONSOLE
> -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\include\c++\3.4.5\mingw32
> -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
> output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.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
> change_online_status()':
> 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:
>
> NDEBUG
> PJ_WIN32=1
> PJ_M_I386=1
> WIN32
> _CONSOLE
>
> Then, click the "Toolchain"-tab -> "Auto-detect" (make sure, the path
> to the left does NOT contain "\bin", e. g. "C:\MinGW", NOT
> "C:\MinGW\bin")
>
> Afterwards, click the "Additional Paths"-tab -> add
> "C:\MinGW\libexec\gcc\mingw32\3.4.5"
>
> After that, click the "Search directories"-tab, and below the
> "Compiler"-sub-tab, there should be the following:
>
> C:\MinGW\include
> C:\MinGW\include\c++\3.4.5
> C:\MinGW\include\c++\3.4.5\backward
> C:\MinGW\include\c++\3.4.5\mingw32
> C:\MinGW\lib\gcc\mingw32\3.4.5\include
> C:\Program Files\System\Platform SDK\Windows\Include
>
> Same goes for the "Linker"-sub-tab:
>
> C:\MinGW\lib
> C:\MinGW\lib\gcc\mingw32\3.4.5
>
> And the "Resource"-sub-tab has just this:
>
> C:\MinGW\include
>
>
> 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
> following:
>
> 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
> =====================
>
> _______________________________________________
> 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 





More information about the pjsip mailing list