本文主要是介绍ubuntu装opencv error: ‘NppiGraphcutState‘ has not been declared,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
错误:/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
这篇关于ubuntu装opencv error: ‘NppiGraphcutState‘ has not been declared的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!