[vlc-devel] [vlc-commits] fixups.h: added an explicit hack so binaries created on OS X Lion can be executed correctly on Snow Leopard

Rafaël Carré funman at videolan.org
Fri Jan 27 14:46:45 CET 2012


On Fri, 27 Jan 2012 12:46:33 +0100
"Felix Paul Kühne" <fkuehne.videolan at googlemail.com> wrote:

> The problem is that _getline is defined on OS X 10.7, but isn't present in earlier releases of OS X. Since we want to compile the 64bit binary on 10.7 including 10.6 support, we need this hack, which is admittedly really ugly, to achieve runtime compatibility with 10.6 by using libcompat's implementation of _getline.

I just checked that /Developers/SDKs/MacOSX10.?/ has a complete /usr
hierarchy

So to make a build that:

- runs on 10.5
=> you must restrict compiler to that hierarchy using --sysroot I think
or other gcc option, so gcc only sees 10.5 headers/libs.
Since 10.5 apps run on 10.7; no problem.

- use 10.7 features
=> you must check what Apple suggests and I believe it is:
* weak imports, and runtime checks that imported function do exist
* copy/paste 10.7 headers since we build against 10.5 headers



More information about the vlc-devel mailing list