Results 1 to 5 of 5

Thread: Using MinGW as compiler in the 5.0 RC 2 windows version of QT

  1. #1
    Join Date
    Oct 2012
    Posts
    132
    Thanks
    10
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Lightbulb Using MinGW as compiler in the 5.0 RC 2 windows version of QT

    Hi,

    Because I reinstalled my windows operating system, I updated to the latest version of the Qt Libraries. I downloaded the 5.0 RC 2 version from this website:
    http://qt-project.org/downloads

    As I wanted to compile one of my projects, I noticed that the MinGW compiler isn't included (in contrast to the previous versions of Qt). I downloaded the lastest version of MinGW, but I don't know how to integrate it in Qt Creator. I already tried to add MinGW as a compiler (I chose "D:\MinGW\bin\gcc.exe" as executable.). Is that the correct way of including an Compiler to Qt Creator? It seems to work, but the problem is, that all the Qt Header Files are missing. Where do I find them and how can I setup MinGW to use them?

    By the way, the Linux version of Qt 5.0 RC 2 supports GCC by default. I'm wondering why there's no Qt version for windows, that supports MinGW - the windows port of GCC - by default?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Using MinGW as compiler in the 5.0 RC 2 windows version of QT

    The Qt Libraries have never included the MingW compiler.

    There is a Qt SDK that includes a Qt Creator, some Qt libraries, and MingW tool chain including GCC 4.4. For released versions of 4.x (since the Qt SDK came into being) there has been a precompiled set of libraries using that old g++ 4.4 version so it could slot into the Qt SDK. Nobody has done that for the unreleased version of Qt5 because the minimum compiler version for MingW is 4.7.

    If you are using Qt Creator 2.5.x then the available Qt versions and tool chains (specified by location of g++) are defined in the Tools, Options... dialog under Build & Run. Your Creator Project puts the two together and they need to match.

    If you are using Qt Creator 2.6 then you need to create a Kit of the compiler and Qt version and then set your Project to use it.

  3. The following user says thank you to ChrisW67 for this useful post:

    Infinity (17th December 2012)

  4. #3
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Using MinGW as compiler in the 5.0 RC 2 windows version of QT

    Only info i got is this comment - so maybe Qt 5.0 will come with binaries built with MinGW and VS 2012 too, if not 5.0.1 will have those.

    Anyway, on top of what ChrisW67 said, you will also need to build Qt framework with MinGW (because the already built binaries that you installed are built using VS 2010) - you can find the source code at the same download location you mentioned.

  5. The following user says thank you to Zlatomir for this useful post:

    Infinity (17th December 2012)

  6. #4
    Join Date
    Oct 2012
    Posts
    132
    Thanks
    10
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Using MinGW as compiler in the 5.0 RC 2 windows version of QT

    Thanks for your help. I will try what you suggested.
    Last edited by Infinity; 17th December 2012 at 21:15.

  7. #5
    Join Date
    Oct 2012
    Posts
    132
    Thanks
    10
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Using MinGW as compiler in the 5.0 RC 2 windows version of QT

    I've resumed to deal with this topic again. I compiled the Qt Library with MinGW now. I think the compilation was successful, but now I want to build Qt Creator using my self compiled Qt Library.

    The problem is, that the compilation of Qt Creator is incomplete.

    I'm using the following command line to create the make file:
    Qt Code:
    1. D:\Qt\qt5_creator\build>qmake d:\qt\qt5_creator\source\qtcreator.pro
    To copy to clipboard, switch view to plain text mode 
    Do I need to create make files for the other sub projects in the source directory, too?

    Then I run MinGW:
    Qt Code:
    1. D:\Qt\qt5_creator\build>mingw32-make release
    2. ......
    3. LD:/Qt/qt5_creator/build2/libs/extensionsystem/lib/qtcreator -lAggregation -LD:/
    4. Qt/qt5/qtbase/lib -lQt5Widgets -lQt5Concurrent -lQt5Gui -lQt5Core
    5. d:/qt/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw
    6. 32/bin/ld.exe: cannot find -lAggregation
    7. collect2.exe: error: ld returned 1 exit status
    8. Makefile.Release:112: recipe for target 'lib\qtcreator\ExtensionSystem.dll' fail
    9. ed
    10. mingw32-make[2]: *** [lib\qtcreator\ExtensionSystem.dll] Error 1
    11. mingw32-make[2]: Leaving directory 'D:/Qt/qt5_creator/build/libs/extensionsyste
    12. m'
    13. Makefile:48: recipe for target 'release' failed
    14. mingw32-make[1]: *** [release] Error 2
    15. mingw32-make[1]: Leaving directory 'D:/Qt/qt5_creator/build/libs/extensionsyste
    16. m'
    17. makefile:438: recipe for target 'sub-libs-extensionsystem-sub_Release_ordered' f
    18. ailed
    19. mingw32-make: *** [sub-libs-extensionsystem-sub_Release_ordered] Error 2
    To copy to clipboard, switch view to plain text mode 

    The compilation of "qtcreator.exe", "Aggregation.dll" and "ExtensionSystem.dll" has been working, but as you can see, I'm getting errors and the compilation isn't complete.
    Do you know, what's the reason for this errors? Do I need to set an additional path? I already added the following directories:
    Qt Code:
    1. D:\Qt\qt5_creator>echo %PATH%
    2. D:\Qt\qt5\qtbase\bin;
    3. D:\Qt\qt5\gnuwin32\bin;
    4. D:\Qt\mingw\bin;D:\Qt\strawberry-per
    5. l-5.16.2.1-64bit\perl\bin;
    6. "D:\Python 2.7.3";
    7. D:\Qt\ruby-1.9.3-p362-i386-mingw32\r
    8. uby-1.9.3-p362-i386-mingw32\bin;
    9. D:\Qt\qt5_deps\icu\dist\lib;
    10. D:\Qt\qt5_deps\opens
    11. sl-1.0.1c\dist\bin;
    12. D:\Qt\PortableGit-1.8.0-preview20121022\cmd;
    13. C:\Windows\System
    14. 32;D:\Qt\qt5_creator\source\src\plugins;
    15. D:\Qt\qt5_creator\source\src\libs;
    16. D:\Qt\
    17. qt5_creator\source\src\plugins\tools;
    18. D:\Qt\qt5_creator\source\src\app
    To copy to clipboard, switch view to plain text mode 

    It would be nice, if someone knows, what I've forgotten to do :-)

    EDIT: I also tried to run configure.bat (I'm not sure how I have to use it), but then the compilation doesn't work, too.
    Last edited by Infinity; 15th January 2013 at 20:53. Reason: removed [B] inside [CODE]

Similar Threads

  1. msvc Compiler or mingw compiler
    By Ashutosh2k1 in forum Qt Programming
    Replies: 3
    Last Post: 14th February 2011, 08:33
  2. Windows minGW g++ version 3.4.5
    By PUK_999 in forum Newbie
    Replies: 4
    Last Post: 21st August 2009, 22:38
  3. How do I use MinGW Compiler in Windows
    By Walsi in forum General Discussion
    Replies: 3
    Last Post: 11th May 2007, 08:50
  4. MinGW Compiler under WXP
    By Walsi in forum Newbie
    Replies: 2
    Last Post: 30th March 2007, 17:26
  5. Loaded QT 4.1.1 and MinGW Compiler
    By Seth in forum Newbie
    Replies: 7
    Last Post: 8th July 2006, 15:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.