curl-library
How to link curl statically against SSL libraries on UNIXes?
Date: Wed, 12 Jun 2002 16:31:51 -0700
What is the official way of building curl (the executable)
to be statically linked against the SSL libraries?
When I modified src/Makefile
and replaced the line
"LIBS = -lssl -lcrypto -ldl"
with
"LIBS=/usr/lib/libssl.a /usr/lib/libcrypto.a -ldl"
the
/bin/sh ../libtool --mode=link gcc -g -O2 -o curl main.o hugehelp.o
urlglob.o writeout.o writeenv.o ../lib/libcurl.la /usr/lib/libssl.a
/usr/lib/libcrypto.a -ldl
command during make produced the following effective link command:
gcc -g -O2 -o curl main.o hugehelp.o urlglob.o writeout.o writeenv.o
../lib/.libs/libcurl.a -lssl -lcrypto /usr/lib/libssl.a
/usr/lib/libcrypto.a -ldl
You can see here that the -lssl -lcrypto preceded the libssl.a and
libcrypto.a
libraries. How to force libtool not to add these unwanted -lssl -lcryto
stuff
into the link line?
Thanks,
Miklos
_______________________________________________________________
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
Received on 2002-06-13