简体   繁体   中英

QT Creator - cross platform compiling

Compiling for Windows, Mac and Linux!

Is the only way to do this.... is to install QT Creator on each OS and compile its own version?

(Currently running QT Creator under Mac OSX)

Qt Creator is just the automation tool, it will create Makefile and adjacent files for you.

If you want to cross-compile, simply extend your Makefile so it could be possible to cross-compile, for example, via:

export TARGET=i686-mingw32
CXX=$TARGET-g++ RANLIB=$TARGET-ranlib AR=$TARGET-ar make -f Makefile.mingw

Reference is here . Please note, you will need to have entire toolchain for every target, including libraries. This is a separate topic, but hopefully there is a whole bunch of articles out there. Btw, most Linux distro's have mingw32 toolchain available, and I believe there should be one for OSX too.

Also, you might be highly interested in tmake - it was originally developed to autogenerate Makefiles for building Qt.

Qt Creator is only an IDE, not a compiler. You can configure it to use whatever compiler you like, including a cross-compiler (for instance GCC cross-compiler ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM