簡體   English   中英

C ++ OpenCV“無法找到或打開PDB文件”和“ Project2.exe中的(opencv_world310.dll):訪問沖突讀取位置

[英]C++ OpenCV “Cannot find or open PDB file” and "(opencv_world310.dll) in Project2.exe: Access violation reading location

我是編程新手,但是我使用C ++和openCV陷入視覺工作室,因為當我運行一些代碼時,該程序給出輸出: Cannot find or open PDB file (opencv_world310.dll) in Project2.exe: 0xC0000005: Access violation reading location 0x00000000056AE000. Cannot find or open PDB file(opencv_world310.dll) in Project2.exe: 0xC0000005: Access violation reading location 0x00000000056AE000. 我不知道該怎么辦,我嘗試了一些互聯網解決方案,但整周都無法解決我的問題:(

這是我的代碼:

#include "opencv2/opencv.hpp"

using namespace cv;
using namespace std;

int main(int argc, char* argv[])
{

    // Read image
    Mat im = imread("cow.jpg");
    Mat imout, imout_gray;

    // Edge preserving filter with two different flags.
    edgePreservingFilter(im, imout, RECURS_FILTER);
    imwrite("edge-preserving-recursive-filter.jpg", imout);

    edgePreservingFilter(im, imout, NORMCONV_FILTER);
    imwrite("edge-preserving-normalized-convolution-filter.jpg", imout);

    // Detail enhance filter
    detailEnhance(im, imout);
    imwrite("detail-enhance.jpg", imout);

    // Pencil sketch filter
    pencilSketch(im, imout_gray, imout);
    imwrite("pencil-sketch.jpg", imout_gray);

    // Stylization filter
    stylization(im, imout);
    imwrite("stylization.jpg", imout);
}

這是我的輸出:

'Project2.exe' (Win32): Loaded 'C:\Users\Wu\Documents\Visual Studio 2015\Projects\Project2\x64\Debug\Project2.exe'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Program Files (x86)\AVG\Av\avghooka.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\opencv 3.1.0\build\x64\vc14\bin\opencv_world310.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\lpk.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_a4d6a923711520a9\comctl32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msvfw32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\avifil32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msacm32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\avicap32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-runtime-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-ucrt_31bf3856ad364e35_6.1.7601.18878_none_09aa4b40304c91e1\ucrtbase.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-timezone-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-file-l2-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-localization-l1-2-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-synch-l1-2-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-processthreads-l1-1-1.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-file-l1-2-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-string-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-heap-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-stdio-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-convert-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-locale-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-math-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-multibyte-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-time-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-filesystem-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-environment-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-utility-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\concrt140.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\OpenCL.DLL'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\IntelOpenCL64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\intelocl64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\task_executor64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\ddraw.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\dciman32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\setupapi.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\Wldap32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\cpu_device64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\tbb\tbb.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\igdrcl64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\igdfcl64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\dbghelp.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\igdbcl64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\igdusc64.dll'. Cannot find or open the PDB file.
Exception thrown at 0x000007FEDB254D61 (opencv_world310.dll) in Project2.exe: 0xC0000005: Access violation reading location 0x00000000056AE000.

The program '[8724] Project2.exe' has exited with code 0 (0x0).

請誰能幫助我解決這個問題? :(

謝謝^^

PDB文件用於調試。 您可以通過以下方式加載它們:

>Debug/Options/Symboles and now check "Microsoft Symbols Servers"

嘗試首先打開您的圖像"cow.jpg"並顯示以下內容: imshow("myWindows",im); 查看圖像是否正確加載並注釋其他行。

記住要在其中包含opencv依賴項:

項目屬性/鏈接器/輸入/補充依賴項

添加路徑(取決於您的安裝)

C:\\ OpenCV_31 \\ opencv \\ build \\ x64 \\ vc14 \\ lib \\ opencv_world310.lib C:\\ OpenCV_31 \\ opencv \\ build \\ x64 \\ vc14 \\ lib \\ opencv_world310d.lib

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM