编译 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