CMake Error at darknet_ros_lib_generated_maxpool_layer_kernels.cu.o.cmake 编译darknet_ros

报错:

[ 42%] Built target darknet_ros_msgs_generate_messages
[ 43%] Building NVCC (Device) object darknet_ros/darknet_ros/CMakeFiles/darknet_ros_lib.dir/__/darknet/src/darknet_ros_lib_generated_col2im_kernels.cu.o
nvcc fatal   : redefinition of argument 'std'
nvcc fatal   : redefinition of argument 'std'
CMake Error at darknet_ros_lib_generated_crop_layer_kernels.cu.o.cmake:207 (message):
  Error generating
  /home/a/catkin_ws/build/darknet_ros/darknet_ros/CMakeFiles/darknet_ros_lib.dir/__/darknet/src/./darknet_ros_lib_generated_crop_layer_kernels.cu.o


nvcc fatal   : redefinition of argument 'std'
CMake Error at darknet_ros_lib_generated_dropout_layer_kernels.cu.o.cmake:207 (message):
  Error generating
  /home/a/catkin_ws/build/darknet_ros/darknet_ros/CMakeFiles/darknet_ros_lib.dir/__/darknet/src/./darknet_ros_lib_generated_dropout_layer_kernels.cu.o

解决:

参考:https://github.com/ComputationalRadiationPhysics/alpaka/issues/186

删除cuda相关部分-std=c++11设置,给cuda更多选择。

 

你可能感兴趣的:(Ubuntu)