curl-library
Anybody successfully bundled libcurl "dylib" (on Mac OS X)?
Date: Wed, 12 Sep 2001 15:02:31 -0700
I'm at my wit's end figuring something out, so maybe there is 
somebody here who has been down a similar path.  I don't know if 
this is a Mac OSX/Darwin-specific issue, or one that would apply to 
other UNIXes out there....
I have built an application  that uses libcurl.  Things work just 
fine when it links to the libcurl that I've configured, make'd, and 
installed into /usr/local/lib.
However, I want to package libcurl into my application so that 
others can use it without the command line.  (Mac users are picky 
that way for some reason.)
The trick, as I understand it, is to get a version of the 
libcurl.dylib file to think that it is installed not in 
/usr/local/lib, but in my application's bundle.  There's a "magic" 
path that you indicate, which would be 
"@executable_path/../Frameworks/libcurl.dylib", which means to look 
in the Frameworks directory in the application package (which is 
also a directory.)
Anyhow, I just don't understand the intracacies of the "ld" flags 
and the configuration and makefiles to figure this out.  (I'm an 
applications developer, not a linker expert!)  So far I think I've 
figured out to use /usr/bin/libtool to make a new copy of 
libcurl.dylib that is "installed" in that special path.
This is what I have:
libtool -dynamic  -o libcurl.dylib -install_name 
"@executable_path/../Frameworks/libcurl.dylib" -v 
/usr/local/lib/libcurl.dylib
However, I get the error "libtool: no library created (no object 
files in input files)".
Has anybody been down this road before?  Is there an alternative to 
getting this to work properly?  (And, of course, still work within 
curl's licensing?)
(I really hope I can figure this out ... if I can't get this to 
happen, I'm going to have to abandon libcurl and find some other 
approach!)
-- Dan Wood dwood_at_karelia.com http://www.karelia.com/ http://www.bikealameda.org/ Mac OS X Developer: Online Resume: http://www.karelia.com/resume.htmlReceived on 2001-09-13