【问题标题】:Program was not found .dll file找不到程序 .dll 文件
【发布时间】:2019-03-31 01:33:44
【问题描述】:

我尝试关注https://docs.opencv.org/3.1.0/d4/d18/tutorial_sfm_scene_reconstruction.html 这段代码,但它无法构建。我使用opencv和extra-contrib 3.4.5版

我尝试将 .dll 添加到项目中,但它不起作用。

'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'E:\opencv\laster\install\x86\vc15\bin\opencv_core345d.dll'. Symbols loaded.
'scenceRecon.exe' (Win32): Loaded 'E:\opencv\laster\install\x86\vc15\bin\opencv_sfm345d.dll'. Symbols loaded.
'scenceRecon.exe' (Win32): Loaded 'E:\opencv\laster\install\x86\vc15\bin\opencv_viz345d.dll'. Symbols loaded.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp140d.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\vcruntime140d.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbased.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\concrt140d.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'E:\opencv\laster\install\x86\vc15\bin\opencv_xfeatures2d345d.dll'. Symbols loaded.
'scenceRecon.exe' (Win32): Loaded 'E:\opencv\laster\install\x86\vc15\bin\opencv_features2d345d.dll'. Symbols loaded.
'scenceRecon.exe' (Win32): Loaded 'E:\opencv\laster\install\x86\vc15\bin\opencv_flann345d.dll'. Symbols loaded.
'scenceRecon.exe' (Win32): Loaded 'E:\opencv\laster\install\x86\vc15\bin\opencv_imgcodecs345d.dll'. Symbols loaded.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\win32u.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32full.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp_win.dll'. Cannot find or open the PDB file.
'scenceRecon.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ucrtbase.dll'. Cannot find or open the PDB file.
The thread 0x27dc has exited with code -1073741515 (0xc0000135).
The thread 0x1f78 has exited with code -1073741515 (0xc0000135).
The program '[6608] scenceRecon.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.```

还有这个 .exe 错误

【问题讨论】:

  • 我相信解决方案是找出丢失的 dll 在哪里。

标签: c++ opencv


【解决方案1】:

这是 Windows API 框架的常见模式。您安装/构建一些框架,该框架带有一组 INCLUDE、LIB 和 DLL 文件。您的代码包含头文件和与 DLL 存根 lib 文件的链接,以便进行编译。但在运行时,无法找到依赖的 DLL,因为它们不在您的 PATH 中(或与 EXE 位于同一文件夹中)。

对话框实际上是在告诉您错误。将 ceres-debug.dll 复制到与 EXE 相同的文件夹中。或者最好,如上所述,只需确保包含 ceres-debug.dll 的任何文件夹都在您的 PATH 环境变量中。通过更新 PATH,您可能会为您的程序或 ceres-debug.dll 所依赖的附加 DLL 解决许多后续错误。

有意义吗?

此外,“DLL 搜索顺序”的快速 google 有几篇很好的文章解释了这个主题:https://docs.microsoft.com/en-us/windows/desktop/Dlls/dynamic-link-library-search-order

【讨论】:

    猜你喜欢
    • 2017-06-06
    • 2014-04-26
    • 1970-01-01
    • 2018-01-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-08
    • 2011-06-26
    相关资源
    最近更新 更多