您的位置:首页 > 运维架构

ubuntu装opencv error: ‘NppiGraphcutState‘ has not been declared

2017-05-27 13:05 465 查看
错误:/home/usrname/opencv-3.1.0/modules/cudalegacy/src/graphcuts.cpp:120:54: error: ‘NppiGraphcutState‘ has not been declared

typedef NppStatus (*init_func_t)(NppiSize oSize, NppiGraphcutState** ppStat

^

/home/usrname/opencv-3.1.0/modules/cudalegacy/src/graphcuts.cpp:135:18: error: ‘NppiGraphcutState‘ does not name a type

operator NppiGraphcutState*()

^

/home/usrname/opencv-3.1.0/modules/cudalegacy/src/graphcuts.cpp:141:9: error: ‘NppiGraphcutState‘ does not name a type

NppiGraphcutState* pState;

.......

解决方案:

进入opencv-3.1.0/modules/cudalegacy/src/目录,修改graphcuts.cpp文件,将:

#include "precomp.hpp"

#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER)

改为

#include "precomp.hpp"

#if !defined (HAVE_CUDA) || defined (CUDA_DISABLER) || (CUDART_VERSION >= 8000)

然后make编译就可以了

转载 http://dongcoder.com/detail-287862.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐