【发布时间】:2016-01-28 12:56:08
【问题描述】:
过去两天我一直在尝试让 opencv 工作。我正在使用 Visual Studio 2015 社区和 opencv 3.1.0。我已经添加了所有的 lib 文件和 dll 并为项目配置了属性。任何见解都会很棒,因为我真的不知道如何解决这个问题。
#include <opencv2\opencv.hpp>
using namespace cv;
int main()
{
namedWindow("win");
waitKey(0);
return 1;
}
上面的代码抛出以下错误。
LNK2019 unresolved external symbol "void __cdecl cv::namedWindow(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?namedWindow@cv@@YAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z) referenced in function main OpenCV
【问题讨论】:
-
需要链接opencv_highgui310(d).lib,或者opencv_world310(d).lib
标签: c++ opencv c++11 dll visual-studio-2015