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

Eagle I Martin Baranski eagle3386 at googlemail.com
Sun Nov 11 08:50:36 EST 2007

2007/11/11, logan <logan04x at gmail.com>:
> Hi,
> Ahh, I'm sorry for my ignorance, the library for Winsock 2 is ws2_32.lib.
> The first error should go with this. For the second one make sure you are
> linking to ole32.lib (Hmm, I wonder why you didn't get errors for
> CoCreateInstance and other COM API's before this, maybe the linker didn't
> try further after getting this error?).
> As of closing the thread, I guess road blocks like this happen with
> everyone, so we can try to help a bit. But, as a side note you should try to
> use the tools that are meant to be used with a particular library.
> And, VC++ 2005 is a standard C++ compilant compiler. You should be able to
> build all standard C++ projects with it. Maybe you were just getting some
> weird errors that needed subtle changes in configuration of VC++ 2003.
> Thanks.


thanks, man! You're one of those guys that support my way of thinking
that there's NO stupid question, but maybe answers which won't help..

Regarding your hint, I'm asking myself why I should add it once more,
because there's already a command-line argument "-ws2_32".. - Here's
the error's full log:

[100.0%] mingw32-gcc.exe -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5 -L"C:\Program Files\System\Platform
SDK\Windows\Lib"  -o ..\bin\pjlib-test-i386-win32-vc8-debug.exe
output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\util.o   -s
-lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32
M:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a "C:\Program
Files\System\Platform SDK\Windows\Lib\WSock32.Lib"
M:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a(sock_bsd.o): In
function `pj_sock_socket':
M:/pj-sip/pjlib/src/pj/sock_bsd.c:347: undefined reference to `WSASocketA at 24'
M:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a(guid_win32.o): In
function `pj_generate_unique_string':
M:/pj-sip/pjlib/src/pj/guid_win32.c:69: undefined reference to `CoCreateGuid at 4'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 9 seconds)
2 errors, 0 warnings

So, as you can see, there's a part talking about "-lmswsock -lws2_32
-lodbc32 -lodbccp32 -loleaut32 -lole32".. Or do I have to setup the
absolute path for all of them?


I didn't want to, but now I have to - let's get this straight, once and for all:

The _only_ chapter that include the letters "GCC" is this one:

Building Linux, *nix, *BSD, and MacOS X Targets with GNU Build Systems

So, let me explain this a little bit further.. The non-professional
developer, i. e. a guy who develops stuff for fun in his spare time,
will visit the page http://www.pjsip.org/using.htm and look for
information about building the SIP-library he thinks would suit
perfectly in a new, free open-source SIP-software for people looking
for something not bloated and kept simple.. Something like KPhone on
Linux maybe..

Therefore, this guy - after managing SVN-installation and shortly
learning its syntax - downloads the SVN-files and gets a first look
into the architecture of the library..

Afterwards, he reads on at the page I've linked to above. But soon, he
will notice that the guide talks about Visual Studio from Microsoft
which normal people maybe don't want to buy. Just think about this:
free, open-source software - built via a commercial IDE from a company
which is heavily involved in commercial stuff.
Wouldn't it be just nicer to build a free software based upon free
library-files and _all_ built with a free IDE using a _free_ compiler?

But this is, where the problem(s) come in.. Even if such a guy would
read the Linux-part of the guide (after he had read the whole guide
about 2 or 3 times - just to make sure nothing has been left hidden
from his eyes), he would come across the part that talks about
Cygwin.. And now think about what well-informed guys talk about Cygwin
and efficiency and stuff like that.. - That's just what I've read and
heard.. I, myself, never tried Cygwin because of those reasons..

So please, explain a stupid guy like me why the hell I should reinvent
the wheel instead of using the ported GCC for Windows together with a
free IDE that supports GCC and throws an app right into my face if the
compiling would one day run without any errors? I just don't get it,
but that's maybe because I'm just too stupid.. - Roland surely knows
more as he thinks that way about me since his very first reply..
(To Roland: Super Hilfe von dir, Landsmann! - Das ich nicht lache.. -.-)

Honestly guys, this isn't helpful!! I'm just doing everything to get
this working (so that others later might do the same way, but faster
and without such pain) and you're talking about ridiculous stuff like
closing the thread or kicking me over to the Code::Blocks-forums..

What's this? Shunt me off so that your "problem" has pissed off and
that "it" must fight all alone?

If I'm such an annoying, stupid guy, put me into your spam-filter so
that (as Roland said) "stealing us time, nerves and mailbox space"
doesn't happen to you and guys like Hitesh or Perry can concentrate on
my problem and helping me through..

Lastly, I'm wishing you all the best and that guys like me _never_
discover the idea of running a SIP-software built around the
PJSIP-library, because if this happens one day again, you will have
the "pain" and "loss of nerves" just once again!

Best regards from a guy, living in Germany who lost his trust in
helpful developers..
= ~ 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