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

Eagle I Martin Baranski eagle3386 at googlemail.com
Thu Nov 8 13:19:22 EST 2007


2007/11/8, logan <logan04x at gmail.com>:
> 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.

Hi,

thanks for that hint.. Although Code::Blocks normally determines the
needed compiler by looking at the file's extension (.c = C, .cpp =
C++), there seem to be some problems..

Therefore I did 2 things:

1. Go into the compiler-settings once again (Settings -> Compiler and
debugger... -> "Toolchain"-tab -> the item for "C compiler" and
"Linker for dynamic libs" should be "mingw32-gcc.exe" ("C++ compiler"
should be "mingw32-g++.exe") and nothing else..

2. Right-click at the pjsua-project and select "Build options..." ->
"Other options"-tab -> enter "-x c" (that forces gcc to explicitly
compile C instead of C++)

The correctness of the changes can be checked by checking "Enable
warnings demanded by strict ISO C and ISO C++ [-pedantic]" at the
"Compiler flags"-tab, because that gives some warnings about
C++-styled comments in some files.. ;)


Anyway, after all that, I still got errors:

[100.0%] mingw32-gcc.exe -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5  -o ..\bin\pjsua_vc8d.exe
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o
output\pjsua-i386-win32-vc8-debug\src\pjsua\main.o   -s -s  -lIphlpapi
-ldsound -ldxguid -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32
-lole32 -luser32
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o: In function `my_atoi':
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:359: undefined reference to
`pj_strtoul'
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:354: undefined reference to
`pj_strtoul'
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o: In function
`write_settings':
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1128: undefined reference
to `pj_strcat2'
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1131: undefined reference
to `pj_strcat2'
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1135: undefined reference
to `pj_strcat2'
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1042: undefined reference
to `pj_strcat2'
M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1105: undefined reference
to `pj_strcat2'
output\pjsua-i386-win32-vc8-debug\src\pjsua\pjsua_app.o:M:/pj-sip/pjsip-apps/src/pjsua/pjsua_app.c:1087:
more undefined references to `pj_strcat2' follow

(There are more, but I got told that the first error often involves
more errors and so fixing the first might fix others as well..)

-- 
=====================
= ~ 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