Important: Please read the Qt Code of Conduct -

How to develop software for Windows on MacOS?

  • I have a macbook. I installed QT. How to develop, assemble, compile programs for Windows? Is there a way without virtual machines?

  • Moderators

    hi @dmitry-maslov and welcome

    there is. But the way is dark and full of terrors.

    It's called cross compiling. In principle you can setup clang to cross compile for windows. That is not easy after that you'll have to cross compile qt as well, no pre compiled libs for that path.

    In all honesty, I would suggest a VM or a really cheap windows laptop. you nearly get one for the license of Parallels.

  • Hi,
    as @J-Hilk said. Me myself, I use Parallels Desktop as VM to run Win10. In coherence mode you have no desktop, just windows and Qt works in that environment very well. I'd strongly suggest going that way.
    Also, if you start to consider VM, please avoid VirtualBox, it is great on Linux and Windows but on Mac it is nothing but trouble.

  • A valid alternative, especially if you are developing open-source software is online CIs. The most famous one for windows is AppVeyor. The idea is to add a script file (.appveyor.yml) to your repository that tells this service how to build your program and how to pack the output of the build then every time you commit to the master barnch or add a tag to your git repo the service builds it for you.

Log in to reply