Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to debug an external library (OpenCV) in Visual C++?
    primarykey
    data
    text
    <p>I am developing a project in VC++2008. The project uses the OpenCV library (but I guess this applies to any other library). I am working with the Debug configuration, the linker properties include the debug versions of the library .lib's as additional dependencies. In VC++ Directories under Tools|Options i set up the include directory, the .lib directory, the source directories for the library as well. I get an error while calling one of the functions from the library and I'd like to see exactly what that function is doing. The line that produces the error is:</p> <pre><code>double error = cvStereoCalibrate(&amp;calObjPointsM, &amp;img1PointsM, &amp;img2PointsM, &amp;pointCountsM, &amp;cam1M, &amp;dist1M, &amp;cam2M, &amp;dist2M, imgSize, &amp;rotM, &amp;transM, NULL, NULL, cvTermCriteria(CV_TERMCRIT_ITER + CV_TERMCRIT_EPS, 100, 1e-5)); </code></pre> <p>I set up a breakpoint at this line to see how the cvStereoCalibrate() function fails. Unfortunately the debugger won't show the source code for this function when I hit "Step into". It skips immediately to the cvTermCriteria() (which is a simple inline, macro-kinda function) and show its contents. Is there anything else I need to do to be able to enter the external library functions in the debugger?</p> <p>EDIT: I think the cvTermCriteria() function shows in the debugger, because it's defined in a header file, therefore immediately accesible to the project.</p> <p>EDIT2: The .pdb files were missing for the library files, now I recompiled the OpenCV library in Visual C++ in Debug configuration, the .pdb files exist but are still somehow invisible to the debugger:</p> <blockquote> <p>Loaded 'C:\Users\DarekSz\Documents\Visual Studio 2008\Projects\libcci\Debug\ccisample.exe', Symbols loaded.<br> 'ccisample.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'<br> 'ccisample.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'<br> 'ccisample.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'<br> 'ccisample.exe': Loaded 'C:\OpenCV2.1\bin\cv210d.dll'<br> 'ccisample.exe': Loaded 'C:\OpenCV2.1\bin\cxcore210d.dll' </p> </blockquote> <p>The symbols aren't loaded apparently for the opencv dlls. Still, the .pdb files exist in the \bin directory.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload