cURL / Mailing Lists / curl-users / Single Mail


Re: Ship curl command line tool with Mac OS X software

From: Nick Zitzmann <>
Date: Tue, 28 Oct 2014 21:18:44 -0500

> On Oct 28, 2014, at 6:11 AM, Marco Baldassarre <> wrote:
> See first two lines? The folder /opt/local/lib is not present on the target machine (a "vanilla" OS X 10.10).

Yeah, /opt is a MacPorts thing IIRC.

> I *think* I do not need neither IDN nor zlib support, but just in case, would it be possible to ship those libraries as well together with the compiled "curl" binary? I tried to supply a path to the libraries in a way that it would be relative, but I could not succeed. In a Windows environment, I am used to supply all relevant libraries (.dll) in the same folder as the compiled binary (.exe), and that would work. I am trying to understand if I can do the same thing on OS X.

You don't need IDN. In fact, IDN can be a security hole when using it with Greek or Cyrillic characters, since they can be used for false impersonation purposes (they have a few characters that look similar to Latin characters, but aren't).

As for zlib, you really should use OS X's zlib and not MacPorts'. Try building curl with the option "--with-zlib=/usr" and see if that fixes it.

> 3. I have now built the tool several times with MACOSX_DEPLOYMENT_TARGET set to 10.6, 10.7, 10.8, and so on. I am going to ship all of them and call the right one depending on the OS the app is running on.
> Is this the correct approach?

No, it isn't. Just build it once with the minimum OS version set to 10.6. If you're using the Mavericks or Yosemite SDK, then that will allow the binary to use all the latest APIs on those OSes, while falling back on the old API for older cats.

Nick Zitzmann

List admin:
Received on 2014-10-29