检测到您的柯南配置文件设置和 CMake 之间的编译器版本不匹配

Detected a mismatch for the compiler version between your conan profile settings and CMake

我遇到了 CMake 的问题,它没有检测到正确版本的 CMake 编译器。

我的 CMake 正在使用命令行,但在 CLion 中没有。

这里是 CLion 中 CMake 工具的输出日志:

CMake Error at build/conanbuildinfo.cmake:1344 (message): Detected a mismatch for the compiler version between your conan profile settings and CMake: Compiler version specified in your conan profile: 9 Compiler version detected in CMake: 8.3 Please check your conan profile settings (conan profile show [default|your_profile_name])

这个问题的解决方法是改变两个编译路径:

CTRL + ALT + S打开参数

前往 Build, Execution, Deployment > Toolchain

C Compiler 切换为 /usr/bin/gcc,将 C++ Compiler 切换为 /usr/bin/g++