Linking to libcrypto
Linking to libcrypto
- Subject: Linking to libcrypto
- From: Michael Rothwell <email@hidden>
- Date: Sun, 2 Nov 2003 18:52:20 -0500
I need to use some MD5 functions in my application. I am linking
against libcrypto for the MD5 functions. When I build on Panther, it
runs on Panther fine. When I build with the "development" settings, it
also runs on Jaguar, so long as I've copied libcrypto to my project
folder and run it through "install_name_tool -id @executable_path ...".
If I don't copy and frob libcrypto, my application tries to link
against /usr/lib/libcrypto.0.9.7.dylib. this is contrary to behavior
I've seen on any other Unix. It should be linking against the generic
version of the library -- the symlink with a less specific version in
its filename -- rather than the exact version on the current OS. When I
copy the application to a Jaguar box for testing, it fails, looking for
/usr/lib/libcrypto.0.9.7.dylib, rather than finding
/usr/lib/libcrypto.0.9.dylib (or better yet, /usr/lib/libcrypto.dylib).
The install_name_tool trick doesn't work, either. My expectation is
that both will link to /usr/lib/libcrypto.dylib. Or failing that, use
the version in the Frameworks directory of the application. Having to
copy a system library into the application's local libraries seems like
an awful hack, anyway.
How does one get linking to actually work on OSX such that applications
are portable between versions?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.