Search code examples
c++qtcross-platformcompilation

Cross-platform compiling of a Qt application


I have written a C++ application that uses the Qt framework. I would like to make this application available on different platforms. Since I use Linux, I have no problems compiling the code for Linux. The questions is:

Can I compile my code in such a way that it will run on Windows, Mac, etc.? As said above, I'm working on a Linux machine and can't possibly install all the different platforms out there.

If it is possible, what steps are required (in simple terms)?

If there is any documentation on this topic, I'm happy to read anything - please just point me in the right direction.

Thanks!


Solution

  • You can kind of do this for Windows, but I don't think there is anything you can do for Mac.

    For Windows, see these two articles:

    Cross-compiling Qt4/Win on Linux

    Cross compiling Qt/Win Apps on Linux

    Also, see this prior stack overflow question.