cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: linking statically on windows /mingw

From: Jason Pump <jpump_at_mindspring.com>
Date: Fri, 29 Sep 2006 14:55:33 -0700

LDLIBS += $(TOP)/$(LIBDIR)/libcurl.a -lz

or

LDLIBS += $(TOP)/$(LIBDIR)/libcurl.a /usr/lib/libz.a

or path where you have zlib installed ( www.zlib.net )

Devang Joshi wrote:
>
> I have following in my make file to compile the libcurl statically:
>
> LDLIBS += $(TOP)/$(LIBDIR)/libcurl.a
>
> CPPFLAGS += -DCURL_STATICLIB
>
>
>
> This is the linking error I am getting:
>
>
>
> ../../../lib/Win32/libcurl.a(timeval.o):timeval.c:(.text+0x8):
> undefined reference to `timeGetTime_at_0'
>
> ../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.text+0x37):
> undefined reference to `inflateEnd'
>
> ../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.text+0xbb):
> undefined reference to `inflate'
>
> ../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.text+0x105):
> undefined reference to `inflateEnd'
>
> ../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.text+0x156):
> undefined reference to `inflateReset'
>
> ../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.text+0x165):
> undefined reference to `inflateInit2_'
>
> make[2]: Leaving directory
> `/sandbox/joshide_ISDNInterface_intg/java_util/ninterface/build/Win32/libisdinterface'
>
> ../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.text+0x207):
> undefined reference to `inflateInit_'
>
> ../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.text+0x365):
> undefined reference to `zlibVersion'
>
> ../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.text+0x385):
> undefined reference to `inflateInit2_'
>
> ../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.text+0x3a1):
> undefined reference to `inflateInit2_'
>
> collect2: ld returned 1 exit status
>
> make[2]: *** [mspcomm.dll] Error 1
>
> make[2]: Target `all' not remade because of errors.
>
>
>
> Any help will be appreciated.
>
>
>
> Thanks,
>
> Devang
>
>
>
Received on 2006-09-29