我在这里遵循了用户提供的关于如何将 openCV 与 VS2012 一起使用的出色指南,一切似乎都正常,直到我运行程序并在其中遇到这些来自调试的消息。
'OPENCV_TEST.exe' (Win32): Loaded 'C:\Users\Michael\Documents\Visual Studio 2012\Projects\OPENCV_TEST\x64\Debug\OPENCV_TEST.exe'. Symbols loaded.
'OPENCV_TEST.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
'OPENCV_TEST.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
'OPENCV_TEST.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
'OPENCV_TEST.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_core2410d.dll'. Cannot find or open the PDB file.
The program '[1228] OPENCV_TEST.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.
我知道它似乎在尝试加载 VS2013 的 .dll 文件,因为它正在尝试打开 vc12 bin,但我检查了我的路径,它们都是 vc11。我是一个完全的业余爱好者,所以非常感谢任何帮助。
我假设您已经为 OpenCV 库设置了路径
打开解决方案的属性页。
在配置管理器中选择发布配置
点击链接器并选择输入
编辑附加依赖项
添加以下内容:
opencv_ts300.lib
opencv_world300.lib
单击“确定”并单击“应用”并运行代码。它应该有效。
我是一名优秀的程序员,十分优秀!