因为在安装pcl1 .8前安装了cuda9.0后出现了以下报错。(之前用另外一台没有cuda的环境下安装可以编译通过)
主要错误摘录:
nvcc fatal : Unsupported gpu architecture ‘compute_20’ CMake Error at pcl_gpu_utils_generated_repacks.cu.o.cmake:209 (message): Error generating
Unsupported gpu architecture ‘compute_20’ CMake Error at pcl_gpu_utils_generated_repacks.cu.o.cmake:209 (message): Error generating
错误截图:
通过搜索可以大致确定是cuda9.0安装后导致的。
方法1:
因为找了很多方案都没有成功,这也是歪打正着。
注意:因为我不打算在pcl中用cuda(主要用于GPU函数计算提速),所以我用了这种方法
解决方案:
This is probably the reason for the build environment, gcc++ and nvcc do not open c++11 by default, you can add “add_definitions(-std=c++11) set(CUDA_NVCC_FLAGS “-std=c++11”)” in CMakeLists.txt.(/home/…/p