Cross compiling for Mac

Started by
3 comments, last by swiftcoder 18 years ago
I want to set up a cross-compiler on my Linux box to compile Mac binaries. What would be nice is if Apple provided some kind of official cross-compiler that could run on x86 *nix and build universal binaries. I don't suppose there's anything like that, is there?
I like the DARK layout!
Advertisement
I asked this question here myself a while back. Didn't really get any conclusive answers...
Go talk to the x86 folks at OpenDarwin, whih is the open-source core for Mac OS X, maybe they have some pointers for you [grin]

It is a problem though, because Apple has modified their edition of GCC fairly heavily (like adding Objective-C++ support), and i don't think the standard branch of GCC can produce Apple binaries easily. Not much reason why Apple's branch couldn't be compiled for *nix though (and Gnu is probably porting some of the enhancements back to trunk GCC). Again, check with OpenDarwin.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

It depends on what you're cross-compiling. If you want to take advantage of the Cocoa/Carbon APIs you'll probably have to do a lot more work.
Actually, thinking back on it, the main problem in cross compiling for Mac is not the compiler, but the Linker.

Apple uses their own version of 'ld', and I have no idea if a binary (or even source) is available for Linux.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement