Building Linux App from QT Creator (Mac OS)
-
wrote on 30 Mar 2018, 10:13 last edited by
Hi there,
I'm new to QT and using it on OS X. I have a very simple QML based app which works on both iOS and OS X, however i want to build it for Linux using QT Creator.
I went to Projects Settings > Manage Kits, but couldnt find a Linux kit.
Please advise how can i do that?
Thanks
-
Hi
That is called cross compiling and should be possible albeit often lots of work and frustration.
This is older guide
https://forum.qt.io/topic/40116/cross-compile-on-os-x-for-windows-and-linux
The concept is still the same, but files are ofc much newer version.Since you also need a linux to test the deployment files then why not just
use something like parallels and just run a virtual linux ?
Normally takes around 1 hour to have it fully running.
For completely free solution, you can also just use VirtualBox. -
wrote on 30 Mar 2018, 11:26 last edited by
@mrjj said in Building Linux App from QT Creator (Mac OS):
Thank you for your quick replyAs im a new QT user and i found building for Android and iOS easy, you can do it from inside the QT Creator, why not something similar for building a linux build to keep life simple?
Is there any specific reason?
-
@mrjj said in Building Linux App from QT Creator (Mac OS):
Thank you for your quick replyAs im a new QT user and i found building for Android and iOS easy, you can do it from inside the QT Creator, why not something similar for building a linux build to keep life simple?
Is there any specific reason?
@scotryder
Hi
Most likely as the total combination of what you could want to cross compile for would explode.
Like Compile for macOS on windows. Compile for MacOS on linux etc.
So crosscompiling is better left to the end user.
If ONLY for macOs , it would make sense but this is also for linux and windows.
Creating all those different kits with the right tools for each platform would be huge work and
hence, its not included. -
@mrjj said in Building Linux App from QT Creator (Mac OS):
Thank you for your quick replyAs im a new QT user and i found building for Android and iOS easy, you can do it from inside the QT Creator, why not something similar for building a linux build to keep life simple?
Is there any specific reason?
wrote on 30 Mar 2018, 23:15 last edited by@scotryder You still need something like a Linux VM to actually run the resulting output and see if it does what you want. So the complexity of setting up a cross compiler doesn't save you from needing some sort of Linux environment as part of your process.
The android and iOS cross compilers are just expected because it's practically impossible to do the dev work inside of Android and iOS. You can really only test the builds in the simulators, but not run the toolchain on a telephone.
1/5