Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. Setting up the MinGW (gcc) compiler in Qt 5.1.1
Forum Updated to NodeBB v4.3 + New Features

Setting up the MinGW (gcc) compiler in Qt 5.1.1

Scheduled Pinned Locked Moved 3rd Party Software
5 Posts 2 Posters 12.0k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    StuartKerr
    wrote on last edited by
    #1

    I've been relentlessly trying to configure version after version of MinGW within Qt and cannot find even the basics elsewhere.

    I'm using Qt Creator 5.1.1 on Windows 7 64-bit.
    Versions of MinGW I've already tried:
    mingw-w64-v3.0.0
    MinGW-gcc-4.4.0-2
    The auto-installed where I can choose version and 64-bit etc

    After I install the compiler (in the recommended "C:\MinGW" directory), it fails to be recognised when I go to Tools > Options > Build & Run > Compilers > Auto-detect in Qt Creator. The general advice has been to add it yourself, however after clicking "Add" to add a manual compiler, I expect that "Compiler path:" means "path" and not a specific executable, but it is forcing me to choose a file (.exe maybe?) as opposed to just the directory everything is located in. There are around 40-50 .exe's within the \bin folder. Which to choose (if at all)?

    This is where I am completely stuck.

    I would be grateful if anyone could offer some advice about what the next step should be. It is ridiculously simple, I imagine, I have just hit a brick wall.

    Thank you!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      AFAIK having several mingw installed in parallel can lead to problems. Why not just use the pre-built MinGW Qt package ? It setups all what you need

      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
      • S Offline
        S Offline
        StuartKerr
        wrote on last edited by
        #3

        Thanks for your reply!

        I Installed Qt with all the extras, etc. But when I tried to build an example project, it displayed the error:
        "error: Qt Creator needs a compiler set up to build. Configure a compiler in the kit options."

        How can I:

        1. Be sure the MinGW Qt package has actually been installed (wouldn't it have defaulted to using this if it had?)?
          2. If it is installed, how can I set it as the defaukt compiler in Qt?

        Thanks you again!

        1 Reply Last reply
        0
        • S Offline
          S Offline
          StuartKerr
          wrote on last edited by
          #4

          Sorted!

          I forgot to mention that I only ever had 1 compiler installed at a time; I uninstalled one before trying another.

          I resorted to Eclipse for the meantime and couldn't get a compiler recognised there either, and found this video on YouTube that not only got it recognized in Eclipse, but also made it autodetect in Qt too!

          http://www.youtube.com/watch?v=b2cfc9ERkpk&list=WL8F25FB39555D8DF3

          I can't believe after 2 days it's finally working!

          Thank you again though!

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            You're welcome !

            Out of curiosity, how did you install Qt ?

            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

            • Login

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