OpenCV2.2+VC2005 error LNK2019错误解决办法
环境OpenCV2.2+vs2005+XP 按照官网提供的安装配置方法,对VS2005的环境进行了设置,但是调试程序时,编译通过却出现链接错误,如下: 1opencvhello.obj : error LNK2019: 无法解析的外部符号 "int __cdecl cv::waitKey(int)" ( ?waitKey@cv@@YAHH@Z ),该符
环境OpenCV2.2+vs2005+XP
按照官网提供的安装配置方法,对VS2005的环境进行了设置,但是调试程序时,编译通过却出现链接错误,如下:
1>opencvhello.obj : error LNK2019: 无法解析的外部符号 "int __cdecl cv::waitKey(int)" (?waitKey@cv@@YAHH@Z),该符号在函数 _wmain 中被引用
1>opencvhello.obj : error LNK2019: 无法解析的外部符号 "void __cdecl cv::imshow(class std::basic_string
1>opencvhello.obj : error LNK2019: 无法解析的外部符号 "void __cdecl cv::namedWindow(class std::basic_string
1>opencvhello.obj : error LNK2019: 无法解析的外部符号 "class cv::Mat __cdecl cv::imread(class std::basic_string
1>opencvhello.obj : error LNK2019: 无法解析的外部符号 "void __cdecl cv::fastFree(void *)" (?fastFree@cv@@YAXPAX@Z),该符号在函数 "public: __thiscall cv::Mat::~Mat(void)" (??1Mat@cv@@QAE@XZ) 中被引用
1>opencvhello.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall cv::Mat::deallocate(void)" (?deallocate@Mat@cv@@QAEXXZ),该符号在函数 "public: void __thiscall cv::Mat::release(void)" (?release@Mat@cv@@QAEXXZ) 中被引用
1>D:/test/opencv/opencvhello/Debug/opencvhello.exe : fatal error LNK1120: 6 个无法解析的外部命令
错误原因:库文件设置不正确
解决办法:项目->属性->连接器->输入->附加依赖项,添加程序所依赖的库文件,本程序用到opencv_core220d.lib 和opencv_highgui220d.lib
推荐阅读
-
出现Git clone The requested URL returned error: 403 错误的解决办法
-
电脑开机弹出错误提示:Autolt Error的解决办法
-
SQL数据库实例名称找不到或远程连接失败并显示错误error40的原因及解决办法
-
电脑出现runtime error错误提示的解决办法
-
PHP Parse Error: syntax error, unexpected $end 错误的解决办法
-
打印机打印出"PCL XL ERROR"的错误怎么办? 打印机状态错误的解决办法
-
MySQL错误 ERROR 2002 (HY000): Can't connect to local MySQL server through socket 的解决办法
-
HTTP 错误 500.19 - Internal Server Error解决办法详解
-
Linux内核编译时出现fatal error: openssl/opensslv.h: No such file or directory错误的解决办法
-
Linux内核编译时出现fatal error: openssl/opensslv.h: No such file or directory错误的解决办法