How to fix a "C compiler cannot create executables" error in Conan?

1 week ago 5
ARTICLE AD BOX

I am building a Windows application in Qt using CMake and I thought to use Conan to simplify dependency management. The generated Conan profile was using msvc, but I changed it to gcc. Additionally, I had to specify the compiler's location. Ultimately the settings looked like this:

[settings] arch=x86_64 build_type=Release compiler=gcc compiler.cppstd=20 compiler.version=15.2 compiler.libcxx=libstdc++11 os=Windows [conf] tools.build:compiler_executables={ "c": "D:\SOFTWARE\mingw\mingw64\bin\gcc.exe", "cxx": "D:\SOFTWARE\mingw\mingw64\bin\g++.exe" }

I'm getting an error message "C compiler cannot create executables". I tested the compiler, it's available at the listed location and can create executables. The config.log file shows that Conan can't find the gcc.exe file.

/d/software/mingw/mingw64in/gcc.exe: No such file or directory
Read Entire Article