2017-06-14 113 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'按鈕。 –