How to select custom compiler "Tool chain" in Qt Creator

Go To StackoverFlow.com

3

I have Qt Creator on my mac. I downloaded the Qt sdk sources, I built them, and I am able to compile code for mac and it runs fine.

I would like to target Windows, so I downloaded mingw32 sources, I built them, and now I have a i386-mingw32-g++ executable that compiles c++ code just fine, and the binary executable compiled from my mac runs just fine on a Windows box.

I would like now to create a new build configuration in Qt Creator so that it will use mingw32 as the compiler, in order to generate Windows binaries.

Here's what I got in the Tool Chains configuration window:

Tool Chains configuration window

Here's what I have in my build configuration:

Build configuration Tool Chains options

As you can see I am not able to select mingw32 as the compiler. Why?

2012-04-04 21:39
by Benoit Duffez


1

It's because your Qt libraries are Mac version. Creator knows the target platform of selected Qt install and shows only the tool chains that work with it.

I don't know how you can install a Windows version of Qt on a Mac. The installer obviously won't work. The only possible path is to build Qt with mingw that you have built.

Edit: Here's some info on cross-compiling Windows libs: http://lists.qt.nokia.com/pipermail/qt-interest/2011-March/031945.html

2012-04-05 00:44
by Stephen Chu
Ads