Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. Qt Contribution
  4. Configure MinGW to QtCreator
QtWS25 Last Chance

Configure MinGW to QtCreator

Scheduled Pinned Locked Moved Qt Contribution
10 Posts 7 Posters 34.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prat22
    wrote on 17 Jan 2014, 22:59 last edited by
    #1

    Hi!

    I am trying to configure MinGW kit to QtCreator 2.8.1(Qt 5.1.1 based on MSVC). I want to change my compiler to GCC. I have installed MinGW and added it to KIt and compiler. But still it shows MSVC2012 as default compiler and when I compile a code it says Qt needs a compiler setup to build. Please help me to resolve this. Thanks!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 17 Jan 2014, 23:08 last edited by
      #2

      Hi and welcome to devnet,

      You can't build an application with MinGW and a Visual Studio Qt build. You need to have both matching.

      The best solution is to uninstall the MinGW you downloaded and install Qt's MinGW package which provides the compiler.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        prat22
        wrote on 17 Jan 2014, 23:10 last edited by
        #3

        Hi!

        Thanks for the reply. But where do I find Qt's MinGW package?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 17 Jan 2014, 23:36 last edited by
          #4

          "here":http://qt-project.org/downloads the Windows 32bit MinGW 4.8 OpenGL package

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            zayani
            wrote on 25 Feb 2014, 10:03 last edited by
            #5

            I have a project that contains a human-machine interface with Qt (c + +) and I need to use a module reports with Qt to export a report (pdf. ..) but I do not understand how to integrate this module reports in QT5!
            thank you

            1 Reply Last reply
            0
            • T Offline
              T Offline
              tobias.hunger
              wrote on 25 Feb 2014, 11:23 last edited by
              #6

              zayani: Please open a new thread for your issue and do not highjack other people's (unrelated) topics.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 25 Feb 2014, 12:14 last edited by
                #7

                Hi and welcome to devnet,

                Please open a new thread rather than hijacking others with unrelated question.

                You should also add what OS your are using as well as the Qt 5 version and what report module you would like to integrate, what you tried and what failed.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  Jeroi
                  wrote on 28 Apr 2014, 16:52 last edited by
                  #8

                  This is the ultimate solution to avoid all problems:

                  1. Install SDK MinGW OpenGL
                  2. Download lates Qt Creator Source
                  3. Open Qt 5.2.1 commad prompt and go to Qt Creator source folder
                  4. Type where -jN replace N with processor thread amount:
                    @qmake -r
                    mingw32-make -jN
                    mingw32-make install INSTALL_PATH=c:\Qt\Qt5.2.1\tools\QtCreatorMinGW@
                  5. Open Windows computer enviromental variables properties and add path:
                    @C:\Qt\Qt5.2.1\5.2.1\mingw48_32\bin@

                  Now you can run any program that needs Qt dll's in order to run your programs because the qt bin folder is in PATH.

                  Now go and replace all necessary links to orginal MSVC crerator build from start menu QT creator or make copy for new Mingw build Creator and form context menu of pro file open with program and check default and browse new build MinGW creator exe form bin directory.

                  Then from newly build Qt Creator Mingw open tools-combiler add the qmake for debugger add gdb from ...5.2.1/mingw*/bin and make new KIT with name QT5.2.1 MinGW for Desktop or similar name.

                  Remember to make the new kit as default kit, or Qt Creator will still offer the old build environment always with new project.

                  Now everything works.

                  This way you can build designer plugins right at your Qt Creator and avoid any build problems with the library as it uses Qt5.2.1 MinGW instead of sourceforge/mingw package which is build depeanding on dwarf 2 and 3 where QT uses dwarf 4.

                  Regards
                  Jeroi

                  R 1 Reply Last reply 4 May 2016, 03:45
                  0
                  • J Jeroi
                    28 Apr 2014, 16:52

                    This is the ultimate solution to avoid all problems:

                    1. Install SDK MinGW OpenGL
                    2. Download lates Qt Creator Source
                    3. Open Qt 5.2.1 commad prompt and go to Qt Creator source folder
                    4. Type where -jN replace N with processor thread amount:
                      @qmake -r
                      mingw32-make -jN
                      mingw32-make install INSTALL_PATH=c:\Qt\Qt5.2.1\tools\QtCreatorMinGW@
                    5. Open Windows computer enviromental variables properties and add path:
                      @C:\Qt\Qt5.2.1\5.2.1\mingw48_32\bin@

                    Now you can run any program that needs Qt dll's in order to run your programs because the qt bin folder is in PATH.

                    Now go and replace all necessary links to orginal MSVC crerator build from start menu QT creator or make copy for new Mingw build Creator and form context menu of pro file open with program and check default and browse new build MinGW creator exe form bin directory.

                    Then from newly build Qt Creator Mingw open tools-combiler add the qmake for debugger add gdb from ...5.2.1/mingw*/bin and make new KIT with name QT5.2.1 MinGW for Desktop or similar name.

                    Remember to make the new kit as default kit, or Qt Creator will still offer the old build environment always with new project.

                    Now everything works.

                    This way you can build designer plugins right at your Qt Creator and avoid any build problems with the library as it uses Qt5.2.1 MinGW instead of sourceforge/mingw package which is build depeanding on dwarf 2 and 3 where QT uses dwarf 4.

                    Regards
                    Jeroi

                    R Offline
                    R Offline
                    RickBlacker
                    wrote on 4 May 2016, 03:45 last edited by
                    #9

                    @Jeroi
                    Hi, you mention in stop 4. Type where -jN replace N with processor thread amount. As example x86 or 64? Do you have an actual example of that this would look like? Sorry to be such a newbie, but... We all start someplace. :)

                    tekojoT 1 Reply Last reply 4 May 2016, 06:12
                    0
                    • R RickBlacker
                      4 May 2016, 03:45

                      @Jeroi
                      Hi, you mention in stop 4. Type where -jN replace N with processor thread amount. As example x86 or 64? Do you have an actual example of that this would look like? Sorry to be such a newbie, but... We all start someplace. :)

                      tekojoT Offline
                      tekojoT Offline
                      tekojo
                      wrote on 4 May 2016, 06:12 last edited by
                      #10

                      @RickBlacker
                      it's a two year old thread :)
                      the -j option in make is used to set how many processes will be used for compiling. It doesn't matter if it's 32 or 64 bit, it's all about the number of cores your machine has. You want them all busy with the compilation, and not idling.

                      For me it would look like "make -j4" as I'm typing on a heavy desktop machine with four cores (my resource manager shows 8, but that is just Intel hyperthreading showing virtual cores).

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved