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

perry at pjsip.org perry at pjsip.org
Sun Nov 11 12:35:18 EST 2007


Hi,

It seems that you are now able to build and link pjlib, and your IDE
found it. The problem now is how your IDE deals with Platform SDK, so
I'm afraid I can't help you further.

As others have suggested, maybe try the Code::Blocks forum or look at
networking/socket samples.

Regards,

On 11/11/07, Eagle I Martin Baranski <eagle3386 at googlemail.com> wrote:
> 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.
>
> Hitesh,
>
> 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\atomic.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\echo_clt.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\errno.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\exception.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\fifobuf.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\file.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_perf.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_tcp.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_udp.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\ioq_unreg.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\list.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\main.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\mutex.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\os.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\pool.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\pool_perf.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\rand.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\rbtree.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\select.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sleep.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sock.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\sock_perf.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\string.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\test.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\thread.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\timer.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\timestamp.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\udp_echo_srv_ioqueue.o
> output\pjlib-test-i386-win32-vc8-debug\src\pjlib-test\udp_echo_srv_sync.o
> 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?
>
>
> Benny,
>
> 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
> =====================
>
> _______________________________________________
> 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
>


-- 
Perry Ismangil
Mobile: +44 7761 179 575
http://www.pjsip.org

PJSIP LLP
23 Langdon Street, Sheffield S11 8BH, United Kingdom
T +44 114 299 8883 F +44 7092 216 3097
Registered in England no. OC323977




More information about the pjsip mailing list