c++ - 找不到程序 .dll 文件

标签 c++ opencv

我试着关注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 错误

最佳答案

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

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

有道理吗?

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

关于c++ - 找不到程序 .dll 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55437129/

相关文章:

java - OpenCV 模板匹配 Max Min 取值范围是多少?需要作为theshold/c++/java

c# - Web 服务的 C++ 返回值

c++ - 将零分配给指针会破坏分配的内存吗?

c++ - 两阶段查找 : can I avoid "code bloat"?

OpenCV SIFT 对比 David Lowe 的 SIFT 实现,OpenCV 差得多

java - 通过TCP将Opencv图像从Android发送到PC

python - Python-OpenCV误报

c++ - 重新开始循环 C++

c++ - C++中的内存分配分析

c++ - 数据检索和索引