cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: linking statically on windows /mingw

From: Devang Joshi <DJoshi_at_isdcorporation.com>
Date: Mon, 2 Oct 2006 13:31:23 -0400

Hi Jason,

 

Where do I find the static lib for zlib? I downloaded their latest one
from zlib.net which has zlibwapi.lib, still gives me error:

# Link with a custom libxml2 & libcurl library inside our build

LDLIBS = $(TOP)/$(LIBDIR)/libxml2.a $(TOP)/$(LIBDIR)/libcurl.a
$(TOP)/$(LIBDIR)/zlibwapi.lib $(TOP)/$(LIBDIR)/libwinmm.a

 

 

g++ -o mspcomm.dll -shared -fleading-underscore -g ISDWSERR.o Isdmain.o
Isdhmap.o Isddstr.o ISDCFGFP.o ISDMessage.o ISDMessageType.o
ISDMessageField.o exports.o ../../../lib/Win32/libxml2.a
../../../lib/Win32/libcurl.a ../../../lib/Win32/zlibwapi.lib
../../../lib/Win32/libwinmm.a -lwsock32 exports.o

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x37): undefined reference to `inflateEnd'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0xbb): undefined reference to `inflate'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x105): undefined reference to `inflateEnd'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x156): undefined reference to `inflateReset'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x165): undefined reference to `inflateInit2_'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x207): undefined reference to `inflateInit_'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x365): undefined reference to `zlibVersion'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x385): undefined reference to `inflateInit2_'

make[2]: Leaving directory
`/sandbox/joshide_ISDNInterface_intg/java_util/ninterface/build/Win32/li
bisdinterface'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x3a1): undefined reference to `inflateInit2_'

collect2: ld returned 1 exit status

 

 

 

Thanks,

Devang

972-550-2746

________________________________

From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Jason Pump
Sent: Friday, September 29, 2006 4:56 PM
To: libcurl development
Subject: Re: linking statically on windows /mingw

 

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:(.te
xt+0x37): undefined reference to `inflateEnd'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0xbb): undefined reference to `inflate'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x105): undefined reference to `inflateEnd'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x156): undefined reference to `inflateReset'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x165): undefined reference to `inflateInit2_'

make[2]: Leaving directory
`/sandbox/joshide_ISDNInterface_intg/java_util/ninterface/build/Win32/li
bisdinterface'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x207): undefined reference to `inflateInit_'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x365): undefined reference to `zlibVersion'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+0x385): undefined reference to `inflateInit2_'

../../../lib/Win32/libcurl.a(content_encoding.o):content_encoding.c:(.te
xt+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-10-02