Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt cannot correctly recognize my MinGW compiler
Forum Updated to NodeBB v4.3 + New Features

Qt cannot correctly recognize my MinGW compiler

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 3 Posters 478 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.
  • C Offline
    C Offline
    coolwind
    wrote on 23 Apr 2024, 11:26 last edited by
    #1

    I'm using a MinGW compiler (gcc-13.2.0). But when the project compile, the IDE wrongly detect it as a msvc compiler and launch the wrong build. And then it throw an error:
    "qt requires a c++17 compiler, and a suitable value for __cplusplus. on msvc, you must pass the /zc:__cplusplus option to the compiler."
    There is no doubt that gcc13 has full support for c++17. The error also is designed for msvc compiler. What should I do?
    454c9c03-7117-4f4b-adb5-314afebcbe0d-image.png b7f1c828-720d-44b7-9fe2-30b861a4a469-image.png

    J 1 Reply Last reply 23 Apr 2024, 11:28
    0
    • C coolwind
      23 Apr 2024, 11:26

      I'm using a MinGW compiler (gcc-13.2.0). But when the project compile, the IDE wrongly detect it as a msvc compiler and launch the wrong build. And then it throw an error:
      "qt requires a c++17 compiler, and a suitable value for __cplusplus. on msvc, you must pass the /zc:__cplusplus option to the compiler."
      There is no doubt that gcc13 has full support for c++17. The error also is designed for msvc compiler. What should I do?
      454c9c03-7117-4f4b-adb5-314afebcbe0d-image.png b7f1c828-720d-44b7-9fe2-30b861a4a469-image.png

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 23 Apr 2024, 11:28 last edited by
      #2

      @coolwind Check your Kit configuration: the used compiler is specified there.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • C Christian Ehrlicher moved this topic from General and Desktop on 23 Apr 2024, 11:48
      • C Offline
        C Offline
        cristian-adam
        wrote on 23 Apr 2024, 13:27 last edited by
        #3

        You need to specify the correct CMake Generator, either Ninja or MinGW Makefiles. See Preferences... > Kits > Kits.

        It looks like you have a Visual Studio generator using msbuild, which is totally wrong.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          coolwind
          wrote on 23 Apr 2024, 13:51 last edited by
          #4

          Emm, thanks. I delete this and create a new project. It works well.

          1 Reply Last reply
          1
          • C coolwind has marked this topic as solved on 23 Apr 2024, 13:51

          1/4

          23 Apr 2024, 11:26

          • Login

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