0

您好我在使用 Visual Studio 2013 和 Windows 8.1 x64 运行 OpenCV 应用程序时遇到问题。

我遵循了本指南:http ://www.youtube.com/watch?v=cgo0UitHfp8 我按照指南 中的说明做了所有事情,除了更改:文件路径中的 x64 代替 x86 和 vs11 代替 vs10。

我试图在 OpenCV 2.4.6 上运行它(文件名类似于“opencv_core246.lib”而不是“opencv_core231.lib”,就像错误中的那样。

你能帮助我吗?

4

2 回答 2

2

确保您包含并链接了正确的目录。这可以在 Visual Studio 解决方案属性中完成(右键单击解决方案并选择Properties)。例如(这是在 Visual Studio 2010 中,但在 Visual Studio 2013 中应该类似)..

设置包含路径

设置包含路径,步骤 1 设置包含路径,步骤 2

设置库路径

设置库路径,第一步 设置库路径,步骤 2

设置库依赖

设置库依赖项,步骤 1 设置库依赖项,步骤 2

于 2013-10-25T12:53:47.587 回答
-1

问题部分解决了。链接 x86 库而不是 x64 有效,但无法运行 OpenCV 应用程序。出现几个不同的错误:

'myOpenCV.exe' (Win32): Loaded 'C:\Users\LK\Documents\Visual Studio 2013\Projects\myOpenCV\Debug\myOpenCV.exe'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\opencv246\build\x86\vc11\bin\opencv_core246d.dll'. Cannot find or open the PDB file.
'myOpenCV.exe' (Win32): Loaded 'C:\opencv246\build\x86\vc11\bin\opencv_highgui246d.dll'. Cannot find or open the PDB file.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp120d.dll'. Cannot find or open the PDB file.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr120d.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\guard32.dll'. Cannot find or open the PDB file.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\version.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\fltLib.dll'. Symbols loaded.
'myOpenCV.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntmarta.dll'. Symbols loaded.
The program '[4284] myOpenCV.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.

还会出现一个窗口,说明程序无法执行,因为缺少 MSVCP110D.dll。我应该安装一些东西吗?或者也许只是改变项目设置?

于 2013-10-26T11:25:53.430 回答