QT Cross-platform, that must be on the Linux platform to compile a can run under Windows QT Program, of course, and qtcreator environment to get together. Working environment: Centos 7yum Install qt5-qt* ming32-qt5-qt* ming64-qt5-qt* # installs all QT packages yum install qt-creator # install qtcreator to Ming W64 For example Open qtcreator,options=> Build & Run = Qt Versions = Addqmake Location: /usr/bin/x86_64- W64-MINGW32-QMAKE-QT5 (note that the browser at the back of the dot is not very handy, because the dialog requires that the file name must be qmake when the browser is added) and that no corresponding compiler will be prompted when you have finished adding QT. We need to add the compiler tab to add a compiler, but before that, click on the right-hand side of the Qmake location, which has an ABI: X86-windows-msys-pe-64bit switch to the Compilers tab, ADD=>MINGW, in compiler path, fill in the output of which x86_64-w64-mingw32-g++, And Abi chose the last record in the Kits tab, Add,compiler and QT version on the selected just added, sysroot fill/usr/x86_64-w64-mingw32/sys-root done! Mingw32 similar, qmake localtion:/usr/bin/i686-w64-mingw32-qmake-qt5, compiler Path:which i686-w64-mingw32-g++, Sysroot:/ usr/i686-w64-mingw32/sys-root released this matter, is to use depends to check the dependence, the copy of the past on the line, it is not good to put <sysroot>/mingw/bin and < All files in the Sysroot>/mingw/lib/qt5/plugins folder are copied to the directory where the executable file is located, and then deleted slowly. Permanent update of this article address: Http://www.linuxdiyf.com/linuX/26377.html
Linux qtcreator Settings MinGW compiler build Windows programs