包含了头文件,为什么还是出现“未声明的标识符”
1个回答
展开全部
可以加上万能头文件模板 #include #include #include #include #include opencv.hpp> #define CV_VERSION_ID CVAUX_STR(CV_MAJOR_VERSION) CVAUX_STR(CV_MINOR_VERSION) CVAUX_STR(CV_SUBMINOR_VERSION) #ifdef _DEBUG #define cvLIB(name) "opencv_" name CV_VERSION_ID "d" #else #define cvLIB(name) "opencv_" name CV_VERSION_ID #endif #pragma comment( lib, cvLIB("core") ) #pragma comment( lib, cvLIB("imgproc") ) #pragma comment( lib, cvLIB("highgui") ) #pragma comment( lib, cvLIB("flann") ) #pragma comment( lib, cvLIB("features2d") ) #pragma comment( lib, cvLIB("calib3d") ) #pragma comment( lib, cvLIB("gpu") ) #pragma comment( lib, cvLIB("legacy") ) #pragma comment( lib, cvLIB("ml") ) #pragma comment( lib, cvLIB("objdetect") ) #pragma comment( lib, cvLIB("ts") ) #pragma comment( lib, cvLIB("video") ) #pragma comment( lib, cvLIB("contrib") ) #pragma comment( lib, cvLIB("nonfree") ) 拿走吧,应该能都解决opencv各个版...
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询