Qt World Summit: Submit your Presentation

Assigning desired toolchain to Qt using mingw vs. MSVC7/8/9

  • I have several version of MSVC and also MinGW loaded on my Windows XP machine. When I build an app, Qt always uses one of the MSVC version and I cannot get it to use MinGW.

    QtCreator 2.4.1 Qt 4.7.4
    MinGW latest from their website.

    Is there a HowTO somewhere? I've looked but obviously not enough.


  • Moderators

    You need to set up the toolchain in Qt Creator's options and then configure your project for the new toolchain. Those things change slightly from release to release, so I can't say for sure how it looked like back in 2.4.1 days. In general, once you have the toolchain, click on "Projects" tab on the left hand side, then "Add" - your new toolchain should be listed there.

  • You need to get a Qt compiled using MinGW instead of MSVC.

  • On windows you need to make sure to build everything with the same compiler (of the same version!). So Creator only offers the compiler that was used to build the Qt version you selected. Any other will (most likely) not produce working binaries anyway.

    If you want to use msvc version X, then you need to register a Qt version built with msvc version X and use that in your project.

    With Qt Creator 2.6 you can any tool chain when setting up a Kit. Creator will only warn when you do that, but you are free to shoot yourself into your foot there;-)

Log in to reply