Linux qtcreator setup MinGW compiler build Windows program

Source: Internet
Author: User

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=&GT;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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.