PoseCNN代码复现CMake编译找不到math_functions.hpp

Linux16.04

编译的时候错误,找不到math_functions.hpp,具体如下:

/usr/local/include/eigen3/Eigen/Core:42:34: fatal error: math_functions.hpp: No such file or directory
     #include 
                                  ^
compilation terminated.
# --error 0x1 --
CMake Error at kinectFusion_generated_voxelGrid.cu.o.Release.cmake:220 (message):
  Error generating

开始以为是eigen3的原因,其实不是。

后来发现是因为CUDA 10.0, math_functions.hpp 在cuda/include/crt/math_functions.hpp, 而不是在原来的位置 cuda/include/math_functions.hpp 然后就报错了,只要重新建立软链接即可。

执行命令:

sudo ln -s /usr/local/cuda/include/crt/math_functions.hpp /usr/local/cuda/include/math_functions.hpp

你可能感兴趣的:(cuda,cmake,linux)