最近在做一个人体动态的三位重建编译项目的时候出现啦:
usr/local/cuda-9.0/include/crt/common_functions.h:64:24: error: token ““CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead.”” is not valid in preprocessor expressions
#define CUDACC_VER “CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead.”
^
/usr/local/cuda-9.0/include/crt/common_functions.h:64:24: note: in definition of macro ‘CUDACC_VER’
#define CUDACC_VER “CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead.”
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/cuda-9.0/include/crt/common_functions.h:64:24: error: token ““CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead.”” is not valid in preprocessor expressions
#define CUDACC_VER “CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead.”
^
/usr/local/cuda-9.0/include/crt/common_functions.h:64:24: note: in definition of macro ‘CUDACC_VER’
#define CUDACC_VER “CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead.”
对于这个问题的解决方案:
去下载高版本的Eigen:https://github.com/eigenteam/eigen-git-mirror
移除旧的Eigen:
cd /usr/include
sudo rm -rf eigen3/
把刚才下载的eigen移动我们下载加压好的Eigen到原来路径:
sudo mv path/of/eigen3 /usr/include/
检查下载的 Eigen 版本:
cat /usr/include/eigen3/Eigen/src/Core/util/Macros.h | grep VERSION
我的结果是这样的:
EIGEN_WORLD_VERSION 3
EIGEN_MAJOR_VERSION 3
EIGEN_MINOR_VERSION 90
然后回去重新编译项目就可以啦
沉下心做事,不难