Should I cross-compile in Linux or Windows?
-
06-07-2019 - |
Question
To create a .exe
in Linux using Qt SDK, should I cross compile my application in Linux or cross-compile my application in Windows?
Solution
You need to cross compile on Linux, for windows.
EDIT:
- install MinGW on Linux.
- cross-compile your Qt code on Linux. A windows binary (.exe) should be produced.
- You are done. Happily execute the exe on any windows system with Qt runtime libraries.
Hope that clears things up.
jrh
OTHER TIPS
Either cross-compile in Linux, or compile in Windows.
First off, kvg. Google search for "cross-compiling qt applications in linux for windows" and first link that comes up is this: http://silmor.de/29
The steps should be simple:
- install mingw
- install qt linux binaries so that you get qmake and moc and other stuff needed for compilation.
- get windows qt binaries and other possible libraries your application requires.
- create a new qmake configuration files (see silmor.de page for more details)
- go to your source folder and call qmake -spec $SpecFileCreatedInStep4
- make
- profit!!
- close your questions in so.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow