7

I was reading an article about cross-compiling for OSX on linux, but it was quite hard to understand.

What tools do I need? And what configurations are necessary?

Are there any tools for creating packages too?

ysth
  • 96,171
  • 6
  • 121
  • 214
Nathan Osman
  • 71,149
  • 71
  • 256
  • 361
  • at first I thought you wanted to compile Mac programs to run on Linux, but I'm guessing you just want to compile them on Linux, later to be run on a Mac. Interesting question. – D.C. May 07 '10 at 04:42
  • @darren: Ya, I don't want to run them - just build them. – Nathan Osman May 07 '10 at 04:43
  • The document you link to tells you in detail what tools you need and where to get them. Matter of fact, that seems to be what it's all about. I doubt that part can be made simpler without sacrificing accuracy, resulting in a worthless, low-content document. By configurations, are you asking how the tools should be configured when they are both built and run? As for packages, are you referring to Mac ".pkg" and ".mpkg" files? – outis May 07 '10 at 05:03
  • possible duplicate of [How to Compile for OS X in Linux or Windows?](http://stackoverflow.com/questions/693952/how-to-compile-for-os-x-in-linux-or-windows) – Daenyth May 05 '12 at 17:48

1 Answers1

3

First you need odcctools, which contains assembler and linker and such (like binutils but capable of handling the Mach-O object format). Then you need the system libraries from the official SDK. You can download it from Apple, but must agree to some stuff and become a member to do so. And finally good old gcc. Quite easy in theory, but in reallity a horrible mess. The easiest way to go (that I know of) is to use I'm Cross!.

Update: I found a newer and better updated method called xchain. It requires more manual work than I'm Cross! thou.

Fabel
  • 1,711
  • 14
  • 36
  • I'm Cross sounds like a great tool but I noticed that there is currently no support for cross-compiling Qt4 (for OS X), which unfortunately is quite important to me. – Nathan Osman Oct 31 '11 at 02:21