Qt cannot correctly recognize my MinGW compiler
-
wrote on 23 Apr 2024, 11:26 last edited by
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?
-
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?
@coolwind Check your Kit configuration: the used compiler is specified there.
-
-
wrote on 23 Apr 2024, 13:27 last edited by
You need to specify the correct CMake Generator, either
Ninja
orMinGW Makefiles
. See Preferences... > Kits > Kits.It looks like you have a
Visual Studio
generator usingmsbuild
, which is totally wrong. -
wrote on 23 Apr 2024, 13:51 last edited by
Emm, thanks. I delete this and create a new project. It works well.
-
1/4