7

I'm developing a Qt application and I need to support Linux, Windows and Mac OS X. The only problem however is that I do not own a Mac. Is it possible to compile my application for Mac OS X on Linux and package it in a .dmg file?

I'm also worried with the fact that my application depends on OpenSSL, can I compile OpenSSL for Mac OS X on my Linux machine?

Thank you.

Raphael
  • 7,972
  • 14
  • 62
  • 83
  • 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) – ephemient Dec 03 '10 at 06:15
  • Do you know any Mac owners who will let you "borrow" their machine online? You can ssh to their Mac to do remote compiles (via qmake+make) and then use VNC to remotely test the GUI from time to time. I'd think that would be a lot easier than trying to cross-compile Mac executables from Linux... and even if you could cross-compile you'd still need access to a Mac to test the resulting executable, so it wouldn't save you much. – Jeremy Friesner Dec 03 '10 at 07:29
  • If it pays out for the project, one could buy some previous generation Macbook (2-3 years old), or a Mac Mini. That should be affordable and do the job. – Frank Osterfeld Dec 03 '10 at 08:48

1 Answers1

2

How do you want to support Mac if you can't even test if your software works?

Cross-compilation for OS X: I doubt there is any solution out there (I'd love to learn about it if it is), you'd need the whole SDK and toolchain for that. For the .dmg file creation part, there is another question here:

How to build a dmg Mac OS X file (on a non-Mac platform)?

There should be no need to bundle openssl, as it's part of every OS X installation.

If you want to support Mac you need to Mac, access to one (remote, rented etc.), or someone who does it for you. I don't think you have another choice.

As the accepted answer in

How to Compile for OS X in Linux or Windows?

suggests, you can go for Macports in case you develop free software. It does the compiling on the user's machine (think FreeBSD ports or Gentoo's emerge). Still, that will require testing.

Community
  • 1
  • 1
Frank Osterfeld
  • 24,815
  • 5
  • 58
  • 70
  • He could use a virtual machine though it's not the best solution. – Roman Kruglov Oct 26 '12 at 16:18
  • 2
    It is worth noting that OS X is starting to work extremely well in VMWare workstation. GUI rendering is a bit slow, but apart from that it's actually good as an environment for compiling and testing. – Steen Schütt Apr 10 '14 at 20:31