问题
I recently tried to do a camera calibration using c++ and openCV given the source code found on this link http://docs.opencv.org/doc/tutorials/calib3d/camera_calibration/camera_calibration.html#source-code
but when i debug it it gave many erros like
cannot find or open PDB file
and
'Native has exited with code -1
What can i do to avoid these errors?
'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).
回答1:
For all the files in Windows/System, not much. You are unlikely to have or need debugger symbols for them. Just don't try to step into them.
For the others, you need to build from source code in debug mode in order to get the PDB symbol files. if you don't have them, you can't debug them. This is probably a problem with your project file.
The final error is probably unrelated. The errors don't stop anything running, they just stop you debugging.
回答2:
'Native has exited with code -1' means that the program (i.e. main
) returned -1.
In other words, look for return -1;
in your main
.
The "pdb" errors are normal when you don't have access to debugger symbols for a DLL.
来源:https://stackoverflow.com/questions/22277668/error-cannot-find-or-open-the-pdb-file-error-in-in-vs-c-2010