curl-library
RE: Linker errors when statically compiled linking libcurl+openssl to my project
Date: Thu, 25 Aug 2011 11:15:01 +0100
Hi,
> I am trying to statically link libcurl (with SSL) into my project but I am
encountering lots of linker errors:
>
> ../lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xa9c): undefined
reference to `CreateDCA_at_16'
> ../lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xaa9): undefined
reference to `CreateCompatibleDC_at_4'
> ../lib/libcrypto.a(rand_win.o):rand_win.c:(.text+0xaba): undefined
reference to `GetDeviceCaps_at_8'
Looking at rand_win.c it uses CreateDCA, CreateCompatiableDC(),
GetDeciceCaps() etc... which are defined in gdi32.lib.
> ../lib/librtmp.a(rtmp.o):rtmp.c:(.text+0x1b3b): undefined reference to
`inet_addr_at_4'
> ../lib/librtmp.a(rtmp.o):rtmp.c:(.text+0x1ba4): undefined reference to
`inet_addr_at_4'
> ../lib/librtmp.a(rtmp.o):rtmp.c:(.text+0x5d1e): undefined reference to
`htonl_at_4'
> ../lib/librtmp.a(rtmp.o):rtmp.c:(.text+0x5eed): undefined reference to
`ntohl_at_4'
These are defined in ws2_32.lib.
What libraries is your application linking against? I'm not a MinGW /
Eclipse user but it looks like you will need to add gdi32.lib and ws2_32.lib
to your project.
Kind Regards
Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-25