Search code examples
windowsmacoscross-platformcross-compiling

Mac compiler on windows


Is it possible to develop cross-platform application on Windows and can also compile for Mac OS X from Windows? I have checked Qt but that requires one to compile from Mac using Xcode.


Solution

  • If this is your priority then one option would be Java as at least a jar file built on one platform can be run on another.

    If however you're talking about C or C++...

    If you are creating a small command line tool then you might be able to make this work with gcc and a cross compiler, but I think it would be a lot of work.

    If however you are wanting to create a GUI application I would urge you to give up now. There are so many issues - you'd have to use Carbon or Cocoa APIs which you can't build for on any other platform, you'd have to link against frameworks which won't exist on your compilation host, you won't be able to easily generate .plist files. Qt won't help as you need to be able to build it, which relies on these same frameworks.

    In short, there's no alternative to building on an actual mac.

    Furthermore, when it comes to fixing bugs, you will absolutely have to do this on a mac (either physical or virtual).