How to Compile for OS X in Linux or Windows?

Unknown picture Unknown · Mar 29, 2009 · Viewed 77.1k times · Source

I would like to port my C/C++ apps to OS X.

I don't have a Mac, but I have Linux and Windows. Is there any tool for this?

Answer

Viktor Latypov picture Viktor Latypov · Apr 26, 2012

For Linux, there is a prebuilt GCC cross-compiler (from publicly available Apple's modified GCC sources).

https://launchpad.net/~flosoft/+archive/cross-apple

Update for 2015

  1. After so many years, the industry-standard IDE now supports OSX/iOS/Android.

http://channel9.msdn.com/Events/Visual-Studio/Connect-event-2014/311

  1. Embarcadero's RadStudio also supports building OSX/iOS/Android apps on Windows.

  2. This answer by Thomas also provides a cross-compilation tool.

For all these options you still need a real mac/i-device to test the application.