【问题标题】:Error : Cannot find or open the PDB file error in in VS C ++ 2010 [duplicate]错误:在 VS C ++ 2010 中找不到或打开 PDB 文件错误 [重复]
【发布时间】:2014-03-09 02:25:48
【问题描述】:

鉴于此链接http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html#source-code上的源代码,我最近尝试使用 c++ 和 openCV 进行相机校准

但是当我调试它时,它给出了很多错误,比如

cannot find or open PDB file 

'Native has exited with code -1

我可以做些什么来避免这些错误?

'ConsoleApplication1.exe': Loaded 'C:\Users\jay\Documents\Visual Studio 2010\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe', Symbols loaded.
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\opencv\build\x86\vc11\bin\opencv_calib3d248.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\opencv\build\x86\vc11\bin\opencv_core248.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvcp110.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvcr110.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\opencv\build\x86\vc11\bin\opencv_flann248.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\opencv\build\x86\vc11\bin\opencv_imgproc248.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\opencv\build\x86\vc11\bin\opencv_features2d248.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\opencv\build\x86\vc11\bin\opencv_highgui248.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\user32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\gdi32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\lpk.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\usp10.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvcrt.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\ole32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\oleaut32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\advapi32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\sechost.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\comctl32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvfw32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\winmm.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\shell32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\shlwapi.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\avifil32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msacm32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\avicap32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\version.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\imm32.dll', Cannot find or open the PDB file
'ConsoleApplication1.exe': Loaded 'C:\Windows\System32\msctf.dll', Cannot find or open the PDB file
The program '[3836] ConsoleApplication1.exe: Native' has exited with code -1 (0xffffffff).

【问题讨论】:

    标签: c++ opencv camera-calibration


    【解决方案1】:

    对于 Windows/System 中的所有文件,并不多。您不太可能拥有或需要它们的调试器符号。只是不要试图踏入它们。

    对于其他人,您需要在调试模式下从源代码构建以获得 PDB 符号文件。如果你没有它们,你就不能调试它们。这可能是您的项目文件的问题。

    最后的错误可能是无关的。这些错误不会停止任何运行,它们只会阻止您进行调试。

    【讨论】:

    • 我安装 openCV 的方式是否与这些错误有关?我总是在教程中看到他们使用 CMake 安装 openCV,但我选择单独安装 openCV 而不使用 CMake,因为它耗时且复杂。
    • 抱歉,帮不上忙。如果您想知道,您可能需要提出一个新问题。
    【解决方案2】:

    'Native has exited with code -1'表示程序(即main)返回-1。

    换句话说,在您的main 中查找return -1;

    当您无权访问 DLL 的调试器符号时,“pdb”错误是正常的。

    【讨论】:

    • 好的..我会再过一遍..我怎样才能访问这些调试器符号?
    • @user3388464 你不太可能需要它们。如果你真的想,OpenCV 可以用符号来构建,但是微软的那些对于像我们这样的凡人来说是不可用的。
    猜你喜欢
    • 1970-01-01
    • 2013-04-02
    • 2012-10-08
    • 1970-01-01
    • 1970-01-01
    • 2011-06-03
    相关资源
    最近更新 更多