我无法在 Vista 上使用 VS2010 编译 opencv 示例

发布于 2024-11-07 19:20:46 字数 786 浏览 7 评论 0原文

我在 Windows Vista 上使用 Visual Studio 2010。我想编译一个由liuliu创建的名为“find_obj.cpp”的OPENCV示例文件。

这是源代码的地址。

https://code.ros.org/trac /opencv/browser/trunk/opencv/samples/c/find_obj.cpp

其他 opencv 代码运行良好,但我无法编译它。请帮助

我已经安装了所有需要的库和 opencv。我的其他 opencv 项目运行良好。

我的错误是“未解决的外部问题” 这里是,

错误 14 错误 LNK1120:11 个无法解析的外部
错误 4 错误 LNK2019:无法解析的外部符号 "class cvflann::Logger & __cdecl cvflann::logger(void)" (?logger@cvflann@@YAAAVLogger@1@XZ) 在函数中引用“public: virtual void __thiscall cvflann::KDTreeIndexParams::print(void)const” (?print@KDTreeIndexParams@cvflann@@UBEXXZ

I am using visual studio 2010 on windows vista. I want to compile a sample file of OPENCV named "find_obj.cpp" created by liuliu.

Here is the address of source code.

https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/c/find_obj.cpp

Other opencv codes works well but I couldn't compile this. please help

I've installed all of the libraries needed and opencv. Other opencv projects of mine are working fine.

My error is "unresolved externals"
here it is,

Error 14 error LNK1120: 11 unresolved externals
Error 4 error LNK2019: unresolved external symbol "class cvflann::Logger & __cdecl cvflann::logger(void)" (?logger@cvflann@@YAAAVLogger@1@XZ) referenced in function "public: virtual void __thiscall cvflann::KDTreeIndexParams::print(void)const " (?print@KDTreeIndexParams@cvflann@@UBEXXZ

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

傻比既视感 2024-11-14 19:20:46

我解决了这个问题。在此示例中,它使用 flann 函数,我将 opencv_flann220d.lib 添加到 Visual Studio 中的库部分。现在,程序编译没有错误。

我了解到,如果您收到“无法解析的外部”错误,这主要是因为缺少包含目录或库。

问候

I solved the problem. In this sample it uses flann functions and I added the opencv_flann220d.lib to libraries section in visual studio. Now, program compiles with no error.

And I learned that if you're getting "unresolved externals" error it is mostly because of missing of include directories or libraries.

greetings

阪姬 2024-11-14 19:20:46

我也在 Vista 上运行 MS Visual Studio 2010 和 OpenCV。

根据我自己的经验:通过操作系统和 Visual Studio 的组合,您可以使用更现代版本的 OpenCV。 OpenCV 3.4.0 将 100% 在您的 PC 上运行。

I'm running MS Visual Studio 2010 and OpenCV on Vista too.

From my own experience: with this combination of operating system and Visual Studio you can use more modern versions of OpenCV. OpenCV 3.4.0 will be 100% working on your PC.

茶花眉 2024-11-14 19:20:46

你会得到什么编译器错误?您是否安装了 OpenCV 并链接了适当的库?

What compiler errors do you get? Have you installed OpenCV and linked the appropriate libraries?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文