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

RK
Roland Klabunde
Sat, Nov 10, 2007 2:50 PM

M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to
WSAStartup@8' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to WSAGetLastError@0'
M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to
WSAGetLastError@0' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to WSAGetLastError@0'

You need to link the winsocket library.

----- Original Message -----
From: "Eagle I Martin Baranski" eagle3386@googlemail.com
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Saturday, November 10, 2007 3:05 PM
Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h

Excellent!

Now we know the name of pjlib file on disk. That name will need to be
referenced on applications that use pjlib.

Next, try to build pjlib-test. If it complains of unreferenced stuff
put the pjlib already build as -l.

Thanks! :)

Yes, it complains about unreferenced stuff.. Therefore, I've added
"-lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a" to the
linker's options, but that didn't solve the problem (even just adding
"-llibpjlib-i386-win32-vc8-debug.a" didn't help.. Full error:

[100.0%] mingw32-gcc.exe -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5  -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
-lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a -s  -lnetapi32
-lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32
C:\MinGW\bin..\lib\gcc\mingw32\3.4.5........\mingw32\bin\ld.exe:
cannot find -lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 8 seconds)
1 errors, 0 warnings

Did I miss something? - Since I want to fix as much stuff as possible
by my own, I played a bit around with the linker's settings (there's
list with libraries at the left and a textarea for entering custom
options at the right - the "-l"-stuff goes into that textarea) and
added the "libpjlib-i386-win32-vc8-debug.a"-file to the list at the
left - that seemed to work a bit better, but I then got this:

[100.0%] mingw32-gcc.exe -LC:\MinGW\lib
-LC:\MinGW\lib\gcc\mingw32\3.4.5  -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
M:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a(os_core_win32.o):
In function pj_init': M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to WSAStartup@8'
M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to
WSAGetLastError@0' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to WSAGetLastError@0'
M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to
`WSAGetLastError@0'

So, although there's no "-l" before the absolute path to the
pjlib-file, it seems to work, because the linker doesn't complain
about "file not found"..

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to `WSAStartup@8' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to `WSAGetLastError@0' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to `WSAGetLastError@0' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to `WSAGetLastError@0' You need to link the winsocket library. ----- Original Message ----- From: "Eagle I Martin Baranski" <eagle3386@googlemail.com> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org> Sent: Saturday, November 10, 2007 3:05 PM Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h > 2007/11/10, perry@pjsip.org <perry@pjsip.org>: >> Excellent! >> >> Now we know the name of pjlib file on disk. That name will need to be >> referenced on applications that use pjlib. >> >> Next, try to build pjlib-test. If it complains of unreferenced stuff >> put the pjlib already build as -l. > > Thanks! :) > > Yes, it complains about unreferenced stuff.. Therefore, I've added > "-lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a" to the > linker's options, but that didn't solve the problem (even just adding > "-llibpjlib-i386-win32-vc8-debug.a" didn't help.. Full error: > > [100.0%] mingw32-gcc.exe -LC:\MinGW\lib > -LC:\MinGW\lib\gcc\mingw32\3.4.5 -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 > -lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a -s -lnetapi32 > -lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32 > C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: > cannot find -lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a > collect2: ld returned 1 exit status > Process terminated with status 1 (0 minutes, 8 seconds) > 1 errors, 0 warnings > > Did I miss something? - Since I want to fix as much stuff as possible > by my own, I played a bit around with the linker's settings (there's > list with libraries at the left and a textarea for entering custom > options at the right - the "-l"-stuff goes into that textarea) and > added the "libpjlib-i386-win32-vc8-debug.a"-file to the list at the > left - that seemed to work a bit better, but I then got this: > > [100.0%] mingw32-gcc.exe -LC:\MinGW\lib > -LC:\MinGW\lib\gcc\mingw32\3.4.5 -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 > M:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a(os_core_win32.o): > In function `pj_init': > M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to > `WSAStartup@8' > M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to > `WSAGetLastError@0' > M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to > `WSAGetLastError@0' > M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to > `WSAGetLastError@0' > > So, although there's no "-l" before the absolute path to the > pjlib-file, it seems to work, because the linker doesn't complain > about "file not found".. > -- > ===================== > = ~ Code is poetry ~ > ===================== > = Martin Baranski > = Eagle | Eagle3386 > = www.troublezone.net > = eagle3386@gmail.com > = +49 (0)160 93317843 > ===================== > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
EI
Eagle I Martin Baranski
Sat, Nov 10, 2007 7:34 PM

2007/11/10, Roland Klabunde roland.klabunde@freenet.de:

M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to
WSAStartup@8' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to WSAGetLastError@0'
M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to
WSAGetLastError@0' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to WSAGetLastError@0'

You need to link the winsocket library.

I thought that is linked by "mswsock"? - Because that one is already linked:

-lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a -s  -lnetapi32
-lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32
^^^^^^^^^^^^^^^^^^^^

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843

2007/11/10, Roland Klabunde <roland.klabunde@freenet.de>: > M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to > `WSAStartup@8' > M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to > `WSAGetLastError@0' > M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to > `WSAGetLastError@0' > M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to > `WSAGetLastError@0' > > > You need to link the winsocket library. I thought that is linked by "mswsock"? - Because that one is already linked: -lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a -s -lnetapi32 -lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32 ^^^^^^^^^^^^^^^^^^^^ -- ===================== = ~ Code is poetry ~ ===================== = Martin Baranski = Eagle | Eagle3386 = www.troublezone.net = eagle3386@gmail.com = +49 (0)160 93317843 =====================
RK
Roland Klabunde
Sat, Nov 10, 2007 7:48 PM

Note the namings. Obviously your lib cannot resolve the functions.

----- Original Message -----
From: "Eagle I Martin Baranski" eagle3386@googlemail.com
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Saturday, November 10, 2007 8:34 PM
Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h

2007/11/10, Roland Klabunde roland.klabunde@freenet.de:

M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to
WSAStartup@8' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to WSAGetLastError@0'
M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to
WSAGetLastError@0' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to WSAGetLastError@0'

You need to link the winsocket library.

I thought that is linked by "mswsock"? - Because that one is already
linked:

-lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a -s  -lnetapi32
-lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32
^^^^^^^^^^^^^^^^^^^^

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Note the namings. Obviously your lib cannot resolve the functions. ----- Original Message ----- From: "Eagle I Martin Baranski" <eagle3386@googlemail.com> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org> Sent: Saturday, November 10, 2007 8:34 PM Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h > 2007/11/10, Roland Klabunde <roland.klabunde@freenet.de>: >> M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to >> `WSAStartup@8' >> M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to >> `WSAGetLastError@0' >> M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to >> `WSAGetLastError@0' >> M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to >> `WSAGetLastError@0' >> >> >> You need to link the winsocket library. > > I thought that is linked by "mswsock"? - Because that one is already > linked: > > -lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a -s -lnetapi32 > -lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32 > ^^^^^^^^^^^^^^^^^^^^ > -- > ===================== > = ~ Code is poetry ~ > ===================== > = Martin Baranski > = Eagle | Eagle3386 > = www.troublezone.net > = eagle3386@gmail.com > = +49 (0)160 93317843 > ===================== > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
L
logan
Sat, Nov 10, 2007 8:05 PM

Hi,

Try wsock32.lib, look for it on your disk and include the path in your
linker directories. If you can't find it then it's available with the MS
Platform SDK.

Thanks.

Best Regards,
Hitesh

----- Original Message -----
From: "Eagle I Martin Baranski" eagle3386@googlemail.com
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Sunday, November 11, 2007 1:04 AM
Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h

2007/11/10, Roland Klabunde roland.klabunde@freenet.de:

M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to
WSAStartup@8' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to WSAGetLastError@0'
M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to
WSAGetLastError@0' M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to WSAGetLastError@0'

You need to link the winsocket library.

I thought that is linked by "mswsock"? - Because that one is already
linked:

-lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a -s  -lnetapi32
-lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32
^^^^^^^^^^^^^^^^^^^^

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Hi, Try wsock32.lib, look for it on your disk and include the path in your linker directories. If you can't find it then it's available with the MS Platform SDK. Thanks. Best Regards, Hitesh ----- Original Message ----- From: "Eagle I Martin Baranski" <eagle3386@googlemail.com> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org> Sent: Sunday, November 11, 2007 1:04 AM Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h > 2007/11/10, Roland Klabunde <roland.klabunde@freenet.de>: >> M:/pj-sip/pjlib/src/pj/os_core_win32.c:134: undefined reference to >> `WSAStartup@8' >> M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to >> `WSAGetLastError@0' >> M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to >> `WSAGetLastError@0' >> M:/pj-sip/pjlib/src/pj/os_core_win32.c:135: undefined reference to >> `WSAGetLastError@0' >> >> >> You need to link the winsocket library. > > I thought that is linked by "mswsock"? - Because that one is already > linked: > > -lM:\pj-sip\pjlib\lib\libpjlib-i386-win32-vc8-debug.a -s -lnetapi32 > -lmswsock -lws2_32 -lodbc32 -lodbccp32 -loleaut32 -lole32 > ^^^^^^^^^^^^^^^^^^^^ > -- > ===================== > = ~ Code is poetry ~ > ===================== > = Martin Baranski > = Eagle | Eagle3386 > = www.troublezone.net > = eagle3386@gmail.com > = +49 (0)160 93317843 > ===================== > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
BP
Benny Prijono
Sun, Nov 11, 2007 12:09 AM

Doesn't anyone else feel that this thread is getting way way much
longer that it really should? I know everyone is keen to help, but
instructions have been clearly given in the website, we don't need
to repeat it here.

IMO this discussion has less to do to pjsip, but rather more to do
with applying pjsip build settings to your favorite IDE (which is
not supported by pjsip anyway), so it's probably best to take it to
the IDE's forum.

cheers,
-benny

Doesn't anyone else feel that this thread is getting way way much longer that it really should? I know everyone is keen to help, but instructions have been clearly given in the website, we don't need to repeat it here. IMO this discussion has less to do to pjsip, but rather more to do with applying pjsip build settings to your favorite IDE (which is not supported by pjsip anyway), so it's probably best to take it to the IDE's forum. cheers, -benny
RK
Roland Klabunde
Sun, Nov 11, 2007 12:35 AM

Benny, I already wanted to say three and a half postings before: Man, change
your signature. Cod(ing) MUST be PAIN for you...:)

Of course, I'm with you. Close this topic..

Regards

----- Original Message -----
From: "Benny Prijono" bennylp@pjsip.org
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Sunday, November 11, 2007 1:09 AM
Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h

Doesn't anyone else feel that this thread is getting way way much
longer that it really should? I know everyone is keen to help, but
instructions have been clearly given in the website, we don't need
to repeat it here.

IMO this discussion has less to do to pjsip, but rather more to do
with applying pjsip build settings to your favorite IDE (which is
not supported by pjsip anyway), so it's probably best to take it to
the IDE's forum.

cheers,
-benny


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

Benny, I already wanted to say three and a half postings before: Man, change your signature. Cod(ing) MUST be PAIN for you...:) Of course, I'm with you. Close this topic.. Regards ----- Original Message ----- From: "Benny Prijono" <bennylp@pjsip.org> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org> Sent: Sunday, November 11, 2007 1:09 AM Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h > Doesn't anyone else feel that this thread is getting way way much > longer that it really should? I know everyone is keen to help, but > instructions have been clearly given in the website, we don't need > to repeat it here. > > IMO this discussion has less to do to pjsip, but rather more to do > with applying pjsip build settings to your favorite IDE (which is > not supported by pjsip anyway), so it's probably best to take it to > the IDE's forum. > > cheers, > -benny > > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
EI
Eagle I Martin Baranski
Sun, Nov 11, 2007 7:40 AM

2007/11/10, logan logan04x@gmail.com:

Hi,

Try wsock32.lib, look for it on your disk and include the path in your
linker directories. If you can't find it then it's available with the MS
Platform SDK.

Thanks.

Hi Hitesh,

thanks for your hint - got it insert (although I additionally had to
insert the absolute path of the library into the linker's options,
too)..

So now, I only remain with 2 errors (instead of more than 50):

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@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@4'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 8 seconds)
2 errors, 0 warnings

Benny,

I'm just thinking that the GCC should be supported, because that's
definitely a better compiler than MS' one.. I'm saying this, because I
had to work with VS 2003 .NET some time ago and especially the linker
was pure pain to me.. It threw errors where GCC worked just fine - and
GCC is stricter than MS' linker..
And since the compiler works fine and the IDE does what it's meant to
be, I don't see any reason for switching over to the
Code::Blocks-forums.
Instead, IMHO it's more a putting-pjsip-into-a-gcc-compatible-form-stuff.. ;)

Roland,

although this might be hard to understand, I want to say that this is
what makes me still saying "code is poetry" - all this hard work will
finally work and then, there's kind of silence and pleasure and what
I'm feeling in that moment is just awesome..
You know, that's this "still standing, fighting with the code and
finally win the battle"..

So, why close this topic as the final step is already in sight?

Regards,
Martin..

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843

2007/11/10, logan <logan04x@gmail.com>: > Hi, > > Try wsock32.lib, look for it on your disk and include the path in your > linker directories. If you can't find it then it's available with the MS > Platform SDK. > > Thanks. Hi Hitesh, thanks for your hint - got it insert (although I additionally had to insert the absolute path of the library into the linker's options, too).. So now, I only remain with 2 errors (instead of more than 50): 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@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@4' collect2: ld returned 1 exit status Process terminated with status 1 (0 minutes, 8 seconds) 2 errors, 0 warnings Benny, I'm just thinking that the GCC should be supported, because that's definitely a better compiler than MS' one.. I'm saying this, because I had to work with VS 2003 .NET some time ago and especially the linker was pure pain to me.. It threw errors where GCC worked just fine - and GCC is stricter than MS' linker.. And since the compiler works fine and the IDE does what it's meant to be, I don't see any reason for switching over to the Code::Blocks-forums. Instead, IMHO it's more a putting-pjsip-into-a-gcc-compatible-form-stuff.. ;) Roland, although this might be hard to understand, I want to say that this is what makes me still saying "code is poetry" - all this hard work will finally work and then, there's kind of silence and pleasure and what I'm feeling in that moment is just awesome.. You know, that's this "still standing, fighting with the code and finally win the battle".. So, why close this topic as the final step is already in sight? Regards, Martin.. -- ===================== = ~ Code is poetry ~ ===================== = Martin Baranski = Eagle | Eagle3386 = www.troublezone.net = eagle3386@gmail.com = +49 (0)160 93317843 =====================
L
logan
Sun, Nov 11, 2007 8:29 AM

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.

Best Regards,
Hitesh

----- Original Message -----
From: "Eagle I Martin Baranski" eagle3386@googlemail.com
To: "pjsip embedded/DSP SIP discussion" pjsip@lists.pjsip.org
Sent: Sunday, November 11, 2007 1:10 PM
Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h

2007/11/10, logan logan04x@gmail.com:

Hi,

Try wsock32.lib, look for it on your disk and include the path in your
linker directories. If you can't find it then it's available with the MS
Platform SDK.

Thanks.

Hi Hitesh,

thanks for your hint - got it insert (although I additionally had to
insert the absolute path of the library into the linker's options,
too)..

So now, I only remain with 2 errors (instead of more than 50):

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@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@4'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 8 seconds)
2 errors, 0 warnings

Benny,

I'm just thinking that the GCC should be supported, because that's
definitely a better compiler than MS' one.. I'm saying this, because I
had to work with VS 2003 .NET some time ago and especially the linker
was pure pain to me.. It threw errors where GCC worked just fine - and
GCC is stricter than MS' linker..
And since the compiler works fine and the IDE does what it's meant to
be, I don't see any reason for switching over to the
Code::Blocks-forums.
Instead, IMHO it's more a putting-pjsip-into-a-gcc-compatible-form-stuff..
;)

Roland,

although this might be hard to understand, I want to say that this is
what makes me still saying "code is poetry" - all this hard work will
finally work and then, there's kind of silence and pleasure and what
I'm feeling in that moment is just awesome..
You know, that's this "still standing, fighting with the code and
finally win the battle"..

So, why close this topic as the final step is already in sight?

Regards,
Martin..

=====================
= ~ Code is poetry ~

= Martin Baranski
= Eagle | Eagle3386
= www.troublezone.net
= eagle3386@gmail.com
= +49 (0)160 93317843


Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

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. Best Regards, Hitesh ----- Original Message ----- From: "Eagle I Martin Baranski" <eagle3386@googlemail.com> To: "pjsip embedded/DSP SIP discussion" <pjsip@lists.pjsip.org> Sent: Sunday, November 11, 2007 1:10 PM Subject: Re: [pjsip] Win32 build doesn't build because of stddef.h > 2007/11/10, logan <logan04x@gmail.com>: >> Hi, >> >> Try wsock32.lib, look for it on your disk and include the path in your >> linker directories. If you can't find it then it's available with the MS >> Platform SDK. >> >> Thanks. > > Hi Hitesh, > > thanks for your hint - got it insert (although I additionally had to > insert the absolute path of the library into the linker's options, > too).. > > So now, I only remain with 2 errors (instead of more than 50): > > 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@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@4' > collect2: ld returned 1 exit status > Process terminated with status 1 (0 minutes, 8 seconds) > 2 errors, 0 warnings > > > Benny, > > I'm just thinking that the GCC should be supported, because that's > definitely a better compiler than MS' one.. I'm saying this, because I > had to work with VS 2003 .NET some time ago and especially the linker > was pure pain to me.. It threw errors where GCC worked just fine - and > GCC is stricter than MS' linker.. > And since the compiler works fine and the IDE does what it's meant to > be, I don't see any reason for switching over to the > Code::Blocks-forums. > Instead, IMHO it's more a putting-pjsip-into-a-gcc-compatible-form-stuff.. > ;) > > > Roland, > > although this might be hard to understand, I want to say that this is > what makes me still saying "code is poetry" - all this hard work will > finally work and then, there's kind of silence and pleasure and what > I'm feeling in that moment is just awesome.. > You know, that's this "still standing, fighting with the code and > finally win the battle".. > > So, why close this topic as the final step is already in sight? > > > Regards, > Martin.. > -- > ===================== > = ~ Code is poetry ~ > ===================== > = Martin Baranski > = Eagle | Eagle3386 > = www.troublezone.net > = eagle3386@gmail.com > = +49 (0)160 93317843 > ===================== > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
BP
Benny Prijono
Sun, Nov 11, 2007 10:38 AM

Eagle I Martin Baranski wrote:

Benny,

I'm just thinking that the GCC should be supported, because that's
definitely a better compiler than MS' one.. I'm saying this, because I
had to work with VS 2003 .NET some time ago and especially the linker
was pure pain to me.. It threw errors where GCC worked just fine - and
GCC is stricter than MS' linker..
And since the compiler works fine and the IDE does what it's meant to
be, I don't see any reason for switching over to the
Code::Blocks-forums.
Instead, IMHO it's more a putting-pjsip-into-a-gcc-compatible-form-stuff.. ;)

Thanks for the suggestion to support gcc, and I've added support for
gcc in pjsip... four years ago! You really really need to read the
Getting Started page to help you with building pjsip and avoid this
misconception.

Lets put this thread to rest already.

-benny

Eagle I Martin Baranski wrote: > Benny, > > I'm just thinking that the GCC should be supported, because that's > definitely a better compiler than MS' one.. I'm saying this, because I > had to work with VS 2003 .NET some time ago and especially the linker > was pure pain to me.. It threw errors where GCC worked just fine - and > GCC is stricter than MS' linker.. > And since the compiler works fine and the IDE does what it's meant to > be, I don't see any reason for switching over to the > Code::Blocks-forums. > Instead, IMHO it's more a putting-pjsip-into-a-gcc-compatible-form-stuff.. ;) Thanks for the suggestion to support gcc, and I've added support for gcc in pjsip... four years ago! You really really need to read the Getting Started page to help you with building pjsip and avoid this misconception. Lets put this thread to rest already. -benny
RK
Roland Klabunde
Sun, Nov 11, 2007 12:21 PM

Instead, IMHO it's more a

putting-pjsip-into-a-gcc-compatible-form-stuff.. ;)

Thanks for the suggestion to support gcc, and I've added support for
gcc in pjsip... four years ago! You really really need to read the
Getting Started page to help you with building pjsip and avoid this
misconception.

Congratulation. I know Benny since years and I didn't manage to upset him
seriously. Martin, please consider to stop annoying the community with
precocious postings and stealing us time, nerves and mailbox space!

Regards

> > Instead, IMHO it's more a putting-pjsip-into-a-gcc-compatible-form-stuff.. ;) > Thanks for the suggestion to support gcc, and I've added support for > gcc in pjsip... four years ago! You really really need to read the > Getting Started page to help you with building pjsip and avoid this > misconception. Congratulation. I know Benny since years and I didn't manage to upset him seriously. Martin, please consider to stop annoying the community with precocious postings and stealing us time, nerves and mailbox space! Regards