VS 2013 OpenCV错误:无法find或打开PDB文件

当我正在compc一个opencv示例项目时,我有这样的错误:

'opencv2.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_core248.dll'. Cannot find or open the PDB file. 'opencv2.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_highgui248.dll'. Cannot find or open the PDB file. 'opencv2.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_contrib248.dll'. Cannot find or open the PDB file. 'opencv2.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_flann248.dll'. Cannot find or open the PDB file. 'opencv2.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_imgproc248.dll'. Cannot find or open the PDB file. 'opencv2.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_features2d248.dll'. Cannot find or open the PDB file. 'opencv2.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_calib3d248.dll'. Cannot find or open the PDB file. 'opencv2.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_ml248.dll'. Cannot find or open the PDB file. 'opencv2.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_video248.dll'. Cannot find or open the PDB file. 'opencv2.exe' (Win32): Loaded 'C:\opencv\build\x64\vc12\bin\opencv_objdetect248.dll'. Cannot find or open the PDB file. 

哦,这个问题在这里经常被回答。

首先,这是没有错误的。 这是一个警告。 预构建的 opencv库实际上没有pdb文件(dl大小)。

所以,你仍然可以运行/调试你自己的代码 ,但是你不能在调试的时候进入opencv库。

再次,没有错误。 如果你仍然需要这个特性,你必须使用cmake在本地重建opencv,这也会生成这些pdb文件。