cURL / Mailing Lists / curl-library / Single Mail


Re: Adding static libcurl.a to xcode 7.2 example project adds libcurl.4.dylib dependency

From: Daniel Stenberg <>
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

> To build libcurl.a, I ran these in my bash shell:
> ./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

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,

> 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.

List admin:
Received on 2016-02-22