How to choose your own Toolchain compiler in Qt Creator

I have Qt Creator on my mac. I downloaded the Qt sdk sources, I created them and I can compile the code for mac and it works fine.

I would like to target Windows, so I downloaded the mingw32 sources, I built them and now I have an executable i386-mingw32-g++

that compiles the C ++ code just fine, and the binary executable compiled from my mac works fine on windows box.

Now I would like to create a new build configuration in Qt Creator so that it uses mingw32 as the compiler to generate Windows binaries.

This is what I got in the tool chain configuration window:

Tool Chains configuration window

This is what I have in my build config:

Build configuration Tool Chains options

As you can see, I cannot select mingw32 as the compiler. Why?

+3


source to share


1 answer


This is because your Qt libraries are Mac version. The creator knows the target framework of the selected Qt installation and only shows the toolchains that work with it.

I don't know how you can install the Windows version of Qt on Mac. The installer will obviously not work. The only possible way is to build Qt with the mingw you created.



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

+1


source







All Articles