Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 10.0.2
-
None
-
windows 11, mingw, qt 6.5.1, qt creator 10
-
-
09a0c0ec1 (11.0)
Description
The problem triggers on windows because mingw c++ standard is 14 there, but I think the issue is common to other platforms also.
Having qt creator and conan 2.0.6 installed.
Create a sample console project, create conanfile.txt at project root. Add following content:
[requires] zxing-cpp/1.4.0
Experience a failure on qt creator log message: conan uses standard c+14 while ZXing require c+17.
Check that project CMakeLists.txt uses c++17. (it was already the case for me)
Be sad
Solution for me was:
Move set(CMAKE_CXX_STANDARD 17) before project() call.
Add following lines in build-folder/.qtc/auto-setup.cmake at line 80:
if (CMAKE_CXX_STANDARD) file(APPEND "${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake" "set(CMAKE_CXX_STANDARD \"${CMAKE_CXX_STANDARD}\")\n") endif()
Re-run cmake, enjoy conan with c++17 support
But, solutions feels pretty dirty.