how to use mingw in QT Creator to compile to windows from linux?
-
I am trying to put together a kit to cross compile a Ubuntu C++ program (that doesn't need QT) in QT Creator to Windows. I have a MingW compiler but it complains that it won't work with my Qt gcc version.
When I start up the QT maintenance tool there is no option to install a windows or mingw version of QT. Is there a painfree way to fix this?
-
If you have a C++ program that does not require Qt then all you need is a working cross-compiler installation. This is available in the Ubuntu repository as mingw-64; it appears to give you GCC 7.
That should work before you try to get any IDE to use it. Does that work?Once that is working, it should be a simple matter to tell Qt Creator to run the cross-compiler executable instead of the native g++. Your source and Makefile should not include Qt headers/libraries and therefore there should not be issues related to absence of these in the cross-compilation environment.