Compiling against libc++ on 10.6 and using the binary on 10.7

Mojca Miklavec mojca at macports.org
Fri Mar 23 10:35:29 UTC 2018


Hi,

I'm compiling some command-line tools and I tried to aim supporting
10.6 (asking 10.6 users to grab libc++ from somewhere if they are
desperate enough to want to use the binaries).

I compiled against libc++ provided by MacPorts and asked a user to
test that binary on 10.7 (I would need to install one somewhere
first). Apparently the binaries did not work there, probably because
libc++ installed on 10.6 is newer than the one Apple shipped with
Lion. I need to double-check if that's in fact the case (he could have
mixed some binaries), but I just wanted to ask if there's some
workaround to that.

(Maybe I should then compile on Lion, grab the 10.6 SDK from
somewhere, compile against 10.6 SDK and link against libc++ from Lion?
I don't particularly like this idea though. I could use the "cxx11
1.1" trick, but I hate to have to relink all the binaries at the end.
None of that is ideal.)

Mojca


More information about the macports-dev mailing list