需要帮助解决 LNK1104: 无法打开文件“opencv_core231.obj”使用 vs2010 构建 opencv helloworld 时
我按照下面链接中的指南进行操作,以获得要编译的 hello world 源代码,但我不断收到链接错误,如标题所示。我不明白为什么。我确实将 vc10 目录中的文件“opencv_core231.lib”包含在项目属性的链接器输入部分中(以及指南中指示的其他内容)。有什么想法吗?
I followed the guide at the link below in order to get a hello world source to compile but I keep getting a link error as shown in the title. I don't understand why. I did include the file "opencv_core231.lib" from the vc10 directory in the linker input section of my project properties (among other things directed in the guide). Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能忘记了“链接器”->“输入”->“附加依赖项”部分中的 .lib。例如,您必须编写“opencv_core241d.lib”而不是“opencv_core241d”
You may have forgot the .lib in the Linker->Input->Additional Dependencies section. For example you have to write "opencv_core241d.lib" instead of "opencv_core241d"
在我使用 OpenCV 2.3 和 Microsoft Visual Studio 的 4-6 周内,我已将所有需要的 .dll 文件复制到我的项目文件夹中。我相信这就是它“完成”的方式。我并不是说你不能拥有某种每次都可以导入的链接表,但它对我来说一直工作得很好。
如果您有兴趣,我使用本指南进行设置:
这家伙使用属性表来使项目更容易制作。这是一个不错的演练,除了我找不到属性管理器,可以通过“查看>其他窗口>属性管理器”来显示。
希望这对您的问题有所帮助。
In the 4-6 weeks I've been working with OpenCV 2.3 and Microsoft Visual Studio, I have copied all needed .dll files to my project folders. I believe that this is just how it is "done". I'm not saying you can't have some sort of link-sheet that you can import every time, but it has been working fine for me.
If you are interested, I used this guide for setup:
This guy uses a property sheet to make projects, further along the path, easier to make. It's a decent walkthrough, with the exception that I could not find the property manager, which can be revealed through "View > Other Windows > Property Manager".
Hope this shed some light on your issue.