curl-library
Re: Adding static libcurl.a to xcode 7.2 example project adds libcurl.4.dylib dependency
Date: Mon, 22 Feb 2016 22:47:47 +0100 (CET)
On Mon, 22 Feb 2016, Stephen Greenfield wrote:
> I've downloaded 7.47.1 so I can build a static libcurl.a on OS X 10.11.2, to
> include in my Xcode 7.2 project / app, for deployment on 10.8 thru 10.11.
> I was doing this to AVOID any dependencies on libcurl.4.dylib.
libcurl.a provides all the same symbols that libcurl.4.dylib does. If you end
up using libcurl.4.dylib anyway, it is probably because you use the wrong link
command.
> To build libcurl.a, I ran these in my bash shell:
>
> export MACOSX_DEPLOYMENT_TARGET="10.8"
> ./configure --disable-share --with-darwinssl
> sudo make clean
> sudo make install
>
> I've been told I don't need sudo, but I get errors if I don't use it:
If you need sudo to run those commands, you did something wrong already before
that point. Like extracted the tarball as root or you did a previous build as
root.
But I also note that you didn't run just plain 'make' there?
> NOTE: I also define CURL_STATICLIB in my Xcode build's preprocessor macro
> build setting
That's not necessary but shouldn't hurt.
> Here's what configure produces:
And after you've ran 'make', you find a libcurl.a in the lib/.libs/ dir,
right?
> Are there other option I need or protocols I must disable to eliminate the
> dependency on libcurl.4.dylib?
That dependency does not come from libcurl. It would be *really* weird for
libcurl to depend on itself.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.htmlReceived on 2016-02-22