Building Linux App from QT Creator (Mac OS)



  • 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


  • Qt Champions 2017

    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.



  • @mrjj said in Building Linux App from QT Creator (Mac OS):
    Thank you for your quick reply

    As 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?


  • Qt Champions 2017

    @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.



  • @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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.