cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: RE: Linker errors when statically compiled linking libcurl+openssl to my project

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Thu, 25 Aug 2011 13:39:58 +0100

Hiya,

> ws2_32.lib was already linked, I added  gdi32.lib. Errors decreased. The
following remain
>
> ../lib/librtmp.a(rtmp.o):rtmp.c:(.text+0x1b3b): undefined reference to
`inet_addr_at_4'
> ../lib/librtmp.a(rtmp.o):rtmp.c:(.text+0x732c): undefined reference to
`htonl_at_4'
> ../lib/librtmp.a(rtmp.o):rtmp.c:(.text+0x757f): undefined reference to
`ntohl_at_4'

Interesting. These are definitely in ws2_32.lib.

> ../lib/librtmp.a(rtmp.o):rtmp.c:(.text+0xb45): undefined reference to
`timeGetTime_at_0'

I just had to check MSDN for this one - and it says this function is defined
in winmm.lib.

I'm not too familiar with librtmp, so I just downloaded the source for it
and checked out it's makefile which includes the following when building
with mingw:

-lws2_32 -lwinmm -lgdi32

Can you add -winmm and see if that decreases the number of errors by 1? If
not, then there is something else going wrong (as the unresolved externals
for ws2_32 have got me baffled at the minute)!

S.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-25