2017-06-14 92 views
-1

我在运行visual studio时遇到了一些麻烦。我从本教程OpenCV 3 Windows 10 Installation Tutorial - Part 1 - C++一步一步地按照说明操作,但仍遇到问题。 我收到一个OpenCV.exe - 系统错误,提示: 程序无法启动,因为您的计算机缺少opencv_world320.dll。尝试重新安装程序来解决这个问题。 我在命令提示符下检查了PATH,出现C:\ OpenCV.3.2.0 \ opencv \ build \ x64 \ vc14 \ bin。 我在输出中获得以下内容:'OpenCV.exe' (Win32): Loaded 'C:\Users\tenicho\Documents\Visual Studio 2017\Projects\OpenCV\x64\Debug\OpenCV.exe'. Symbols loaded. 'OpenCV.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file. 'OpenCV.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file. 'OpenCV.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file. 'OpenCV.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file. 'OpenCV.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Cannot find or open the PDB file. 'OpenCV.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file. The thread 0x2798 has exited with code -1073741515 (0xc0000135). The thread 0x182c has exited with code -1073741515 (0xc0000135). The thread 0x13f0 has exited with code -1073741515 (0xc0000135). The program '[9604] OpenCV.exe' has exited with code -1073741515 (0xc0000135) 'A dependent dll was not found'.OpenCV.exe - 系统错误

以下是路径导向的文件夹的图片。你可以看到.dll文件在那里。 enter image description here

任何人有这个问题?

预先感谢您!

+0

欢迎来到Stack Overflow。请花些时间阅读[The Tour](http://stackoverflow.com/tour),并参阅[帮助中心](http://stackoverflow.com/help/asking)中的资料,了解您可以在这里问。 –

+0

你的应用程序是32位的吗?奇怪的是,似乎这个DLL只存在于我的64位bin文件夹中。 –

+0

我不太确定。我会假设它应该是64,但在下面的链接上只有一个用于Windows下载的opencv。 http://opencv.org/releases.html我以前没有见过这个问题。 – tenichols

回答

0

我的32位的DLL opencv_world缺少...

之前做到以下几点,你应该在你的OpenCV/bin中检查/释放是opencv_world是不存在的。你的应用程序是32位(根据你的调试日志中的(Win32)),所以这个文件夹也应该在你的路径中。我也将debug文件夹添加到路径中。

如果找不到32位opencv_world.dll。这就是我刚才所做的。

  1. 用cmake-gui打开opencv-3.2/opencv/sources重新启动。
  2. 运行configure后,确保BUILD_open_cv_world被选中(它不在我的机器上)。
  3. 单击生成
  4. 点击打开项目
  5. 在Visual Studio中,选择建设 - >批量构建
  6. 选择ALL_BUILD调试+发行
  7. 单击构建
  8. 很耐心...
  9. 要非常非常耐心。让自己喝茶或找点事情做。 :)
  10. 有可能是一个更快的方法来做到这一点,但我不知道它。这太糟糕了,也许不会检查每个BUILD_选项,只检查BUILD_open_cv_world,但我不想搞乱我的开放式cv安装。足够长的时间来设置它。
  11. 您现在应该在bin/release和bin/debug文件夹中有dll。
+0

感谢您的回复。首先,我对这个问题的无知表示歉意,但我在一些事情上迷失了方向。我已经下载了CMake。你在第1步中意味着什么?我从来没有使用过Cmake,也不知道它用于什么。另外文件夹opencv/bin/Release不会退出。 – tenichols

+0

安装cmake后,您会在程序files \ cmake \ bin文件夹中找到cmake-gui。它的图标是一个彩色的三角形。打开它。您必须在顶部编辑框“源代码在哪里”以及您的opencv构建路径“C:\ Users \ tenicho \ Documents \ Visual Studio 2017 \ Projects \ OpenCV”中选择您打开opencv/sources的路径“在第二个编辑框”在哪里建立二进制文件“。您可以在cmake-gui对话框中找到'configure','build'和'open project'按钮。 –