Important: Please read the Qt Code of Conduct -

Can I create an .exe file or a .dmg file from linux?

  • Hello,
    I installed Qt on OpenSuse and I would like to learn using it. I would like to find out if it is possible to create an application that I can make it an .exe file that can run on Windows 10 and a .dmg file that can be executable on a Mac. If so, is there any tutorial for beginners that shows how to do that?

  • No you cannot create applications for different platforms under linux.
    You need to compile the apps under windows or macos.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    If you are not using anything Linux specific you can use the MinGW cross-compiler, not easy but doable.

    As of macOS, no.

    On a side note, if you are just staring to learn, I wouldn't recommend to go the cross-compilation road as a starter. A virtual machine for Windows would be best so you can test your application while developing it.

  • Qt Champions 2019

    @karlheinzreichel Your claim is wrong: you can build programs for many many other platforms on Linux except MacOS. This is called "cross compilation".

Log in to reply