0

I am new to QT5 and I don't really understand what I've found online. So I'm asking the question here so I could answer and ask questions too !

So on a Ubuntu VM I have a QT program that I can build and execute. I want to have a .exe so I can execute it on my Windows Computer.

I have found that I have to download on the VM MinGW for a Windows 64x usage, and then I have understood that it could create me a Make for Windows, but I don't understand how and how to set it up.

Thanks a lot !

DamienDne
  • 27
  • 1
  • You say Ubuntu is in a VM. What OS does the VM itself run in? – HolyBlackCat Jan 24 '23 at 14:22
  • It will be much easier to compile on MS Windows if you want a windows application. Cross compiling while possible is not an easy or beginner task. – drescherjm Jan 24 '23 at 14:25
  • Related: [https://stackoverflow.com/questions/10934683/how-do-i-configure-qt-for-cross-compilation-from-linux-to-windows-target](https://stackoverflow.com/questions/10934683/how-do-i-configure-qt-for-cross-compilation-from-linux-to-windows-target) – drescherjm Jan 24 '23 at 14:28
  • And: [https://stackoverflow.com/questions/14170590/building-qt-5-on-linux-for-windows/14170591#14170591](https://stackoverflow.com/questions/14170590/building-qt-5-on-linux-for-windows/14170591#14170591) – drescherjm Jan 24 '23 at 14:29
  • @drescherjm Ii am using linux librairies on my program, that's why I have to cross compiling – DamienDne Jan 24 '23 at 14:32
  • 1
    If you are using linux libraries then you can not build a windows application. You will need to stick with linux. – drescherjm Jan 24 '23 at 14:45
  • You may want to use WSL to run your linux application under windows: [https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps) – drescherjm Jan 24 '23 at 14:58
  • 1
    Cross-compiling to Windows is (almost?) always strictly worse than compiling directly on Windows. It doesn't give you access to any new libraries, or anything like that. – HolyBlackCat Jan 24 '23 at 15:39
  • Does this answer your question? [Building Qt 5 on Linux, for Windows](https://stackoverflow.com/questions/14170590/building-qt-5-on-linux-for-windows) – pigrammer Jan 25 '23 at 10:55

0 Answers0