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

编译 PCL for Android (https://github.com/bashbug/pcl-for-android.git)后,运行测试代码时,报如下的错误,在网上怎么查也没有查到,后来发现是NDK 版本的问题,现在记录一下:

 

CMake Error at /home/xhb/demo/pcl-example-app/app/.cxx/cmake/debug/arm64-v8a/conanbuildinfo.cmake:1060 (message):
  Detected a mismatch for the compiler version between your conan profile
  settings and CMake:

  Compiler version specified in your conan profile: 8

  Compiler version detected in CMake: 9.0

  Please check your conan profile settings (conan profile show
  [default|your_profile_name])

  P.S.  You may set CONAN_DISABLE_CHECK_COMPILER CMake variable in order to
  disable this check.
Call Stack (most recent call first):
  /home/xhb/demo/pcl-example-app/app/.cxx/cmake/debug/arm64-v8a/conanbuildinfo.cmake:1157 (conan_error_compiler_version)
  /home/xhb/demo/pcl-example-app/app/.cxx/cmake/debug/arm64-v8a/conanbuildinfo.cmake:1245 (check_compiler_version)
  /home/xhb/demo/pcl-example-app/app/.cxx/cmake/debug/arm64-v8a/conanbuildinfo.cmake:799 (conan_check_compiler)
  cmake/conan.cmake:503 (conan_basic_setup)
  CMakeLists.txt:11 (conan_cmake_run)

CMake Error at /home/xhb/demo/pcl-example-app/app/.cxx/cmake/debug/arm64-v8a/conanbuildinfo.cmake:1060 (message):
  Detected a mismatch for the compiler version between your conan profile
  settings and CMake:

  Compiler version specified in your conan profile: 8

  Compiler version detected in CMake: 9.0

  Please check your conan profile settings (conan profile show
  [default|your_profile_name])

  P.S.  You may set CONAN_DISABLE_CHECK_COMPILER CMake variable in order to
  disable this check.
Call Stack (most recent call first):
  /home/xhb/demo/pcl-example-app/app/.cxx/cmake/debug/arm64-v8a/conanbuildinfo.cmake:1157 (conan_error_compiler_version)
  /home/xhb/demo/pcl-example-app/app/.cxx/cmake/debug/arm64-v8a/conanbuildinfo.cmake:1245 (check_compiler_version)
  /home/xhb/demo/pcl-example-app/app/.cxx/cmake/debug/arm64-v8a/conanbuildinfo.cmake:799 (conan_check_compiler)
  cmake/conan.cmake:503 (conan_basic_setup)
  CMakeLists.txt:11 (conan_cmake_run)

Configuration failed.
executing external native build for cmake /home/xhb/demo/pcl-example-app/app/src/main/cpp/CMakeLists.txt

FAILURE: Build failed with an exception.

* What went wrong:
executing external native build for cmake /home/xhb/demo/pcl-example-app/app/src/main/cpp/CMakeLists.txt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 47s
ERROR: Cause: executing external native build for cmake /home/xhb/demo/pcl-example-app/app/src/main/cpp/CMakeLists.txt

 

当使用NDK20 时会后  Compiler version detected in CMake: 9.0

当使用 android-ndk-r18b 时会后  Compiler version detected in CMake: 7.0

android-ndk-r19c刚好对应 CMake8

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值