Re: Building against MY openSSL (libcrypto) static library ?
Re: Building against MY openSSL (libcrypto) static library ?
- Subject: Re: Building against MY openSSL (libcrypto) static library ?
- From: Heath Raftery <email@hidden>
- Date: Wed, 19 May 2004 09:45:57 +1000
Hi,
On 19/05/2004, at 4:36 AM, Aurilien Hugeli wrote:
my software heavily uses openSSL library (libcrypto.0.9.7). It works
perfectly under 10.3 since libcrypto.0.9.7.dylib is included in
panther.
But my software does not work in jaguar because jaguar only offers
libcrypto.0.9.6...
I also use libcrypto in my application, which I develop on Panther, but
the libcrypto version in Jaguar was "good enough" for my purposes.
Therefore, I just use the 10.2.7 SDK and tell Xcode to target for OS
10.2. That forces the linker to dynamically use libcrypto from the SDK,
not from /usr/lib. So otool -L gives me:
/usr/lib/libcrypto.0.9.dylib (compatibility version 0.9.0, current
version 0.9.6)
For libcurl however, no libcurl.dylib exists in the 10.2.7 SDK, so I am
able to provide my own libcurl.a in /usr/local/lib and the linker will
statically link that in (as long as I specify -L/usr/local/lib). To use
this method on a static libcrypto though, you would have to hide the
libcrypto.dylib that is in the 10.2.7 SDK, which is starting to look
very hacky.
almost every forums advice to simply build my own libcrypto0.9.7 for
jaguar.
I succeed to build it statically using fink, thanks to them ! and
tried to embed the library.
but now when i link my project to this new static library, the
products is still linked to the panther library !
(otool -L give me /usr/lib/libcrypto.0.9.7) so it is still linked to a
dynamic library !!
I've used this method as well, and it is a bit of a hassle forcing the
linker to use the static version. I played with the -static, -L, -l, -Z
and -search_paths_first linker options, but Xcode does work quite hard
to link dynamically. I think I was successful in the end, using
-L/usr/local/mystaticlibs -search_paths_first -lmylib or something.
That should allow you to place just the static libs in mystaticlibs,
and the linker will be required to use those first.
Hope that helps in some way,
Heath
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.