Using MinGW compiler on Windows 7



  • I have been developing using Qt on Linux for some time. I have been asked to port to MS Windows. I am not a W7 expert and am having difficulty setting it up.
    I downloaded Qt: ( qt-opensource-windows-x86-msvc2010-5.5.1 )
    and MinGW: ( i686-4.9.1-release-posix-dwarf-rt_v3-rev2 )
    I installed MinGW (can run gcc on command line) and added c:\minGW/bin to %PATH%
    I installed Qt, only option seems to be for MSVS so I unchecked that.
    On running Qt Creator -> Tools -> Build and run:
    I see:
    In Compiler Tab I have: MinGW
    In Debugger Tab: I have: GDB
    In Qt Versions: I have nothing
    In Kits I have: Manual/desktop which points to MinGW and GDB, but does not have a Qt version or a Qt mkspec.

    So .... I assume what is missing is a 'qmake' - Any idea how I create this? I have looked all over the web - and I cannot find the missing bit of info.
    (Or am I just being thick!?)

    Thanks


  • Lifetime Qt Champion

    Hi,

    You downloaded the Visual Studio 2010 version of Qt. You can't mix and match compilers on Windows, even MSVC is not compatible from one version to the other.

    If you want to use MinGW, just uninstall both you installed. Download the MinGW package and install it. You have everything you need in it, including MinGW. No need for an external version.



  • You've download the wrong installer.

    qt-opensource-windows-x86-msvc2010-5.5.1

    That's for Visual Studio. You should have downloaded

    qt-opensource-windows-x86-mingw492-5.5.1

    If Qt is not automatically detected by Qt Creator, you can add it manually. The qmake executable is located inside the bin folder, under Qt's installation path.



  • Thank you both.

    I misunderstood how the installers worked (I create from sources on Linux)
    Cheers


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.