curl-library
RE: How to statically link openssl to libcurl so that libcurl would use the right version of openssl
Date: Wed, 28 Jun 2006 14:32:22 -0400
Hi Dan,
Thanks for the information. I did a quick test based on what you suggest
using a simple program before I re-build my libcurl with openssl:
1. I have toto.cxx that has one function called: toto() {cout << "static
toto" << endl;}
2. I create an archive say toto.a has the toto.o
3. I have toto1.cxx that has one functin called toto() {cout <<"shared
toto"<<endl;}
4. I create a shared libtoto1.so
5. I have use_toto.cxx that has one function called use_toto() {
toto();}:
6. I create a shared libuse_toto.so that statically link to toto.a
g++ --enable-hidden-symbols -shared -o libuse_toto.so -L./ -ltoto
./use_toto.o
7. My main program test.cxx calling use_toto()
I would like to always see the output of "static toto" but the output
depends on the order of linking toto1.so and use_toto.so
I will see "shared toto" when I do this
g++ -o test -L./ -ltoto1 -L./ -luse_toto test.o
I will see "static toto"
g++ -o test -L./use_toto -L./ -ltoto1 test.o
Did I use the option --enable-hidden-symbols correctly?
Thanks,
Hongbo.
-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of Dan Fandrich
Sent: Wednesday, June 28, 2006 1:22 PM
To: curl-library_at_cool.haxx.se
Subject: Re: How to statically link openssl to libcurl so that libcurl
would use the right version of openssl
On Wed, Jun 28, 2006 at 12:46:23PM -0400, Hongbo Li wrote:
> How I can build libcurl to ensure that it will only use the version of
> openssl built into libcurl and will not use the one loaded by the
> driving program (in my case, SUN SSHD)?
Try the --enable-hidden-symbols configure option available in CVS or
recent daily tar balls (assuming you're using gcc). If you're using the
SunPro 5.5 compiler, I can give you some completely untested patches
that
should do the same thing there.
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2006-06-28