I am trying to use OpenCV in VS 2010. I am an amateur, and I am learning first steps from the OpenCV wiki. However, when trying to debug my project, I get the following errors:
'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file 'C:\Windows\SysWOW64\kernellbase.dll', Cannot find or open the PDB file
I have those files in the right directory, so why can't it open them? What should I do to fix the problem?
I ran into the same issue. When I ran my Unit Test on C++ code, I got an error that said "Cannot find or open the PDB file".
Logs
When I looked at the Output log in Visual Studio, I saw that it was looking in the wrong folder. I had renamed the WinUnit folder, but something in the WinUnit code was looking for the PDB file using the old folder name. I guess they hard-coded it.
Found the Problem
When I first downloaded and unzipped the WinUnit files, the main folder was called "WinUnit-1.2.0909.1". After I unzipped the file, I renamed the folder to "WinUnit" since it's easier to type during Visual Studio project setup. But apparently this broke the ability to find the PDB file, even though I setup everything according to the WinUnit documentation.
My Fix
I changed the folder name back to the original, and it works.
Weird.
Referring to the first thread / another possibility VS cant open or find pdb file of the process is when you have your executable running in the background. I was working with mpiexec and ran into this issue. Always check your task manager and kill any exec process that your gonna build in your project. Once I did that, it debugged or built fine.
Also, if you try to continue with the warning , the breakpoints would not be hit and it would not have the current executable
For VS2013 users who find themselves here as I did:
You'll see that the
Cache symbols in this directory:
field is empty; you can either browse/enter the path yourself or just go ahead and click theLoad all symbols
button. An alert window will appear saying "Since you haven't selected a symbol-cache directory the default will be used". You'll now seeC:\Users\XXXX\AppData\Local\Temp\SymbolCache
in the previously empty path-field. ClickLoad all symbols
a second time and you should be set. Hit ok, and just for the sake of diligence, clean and rebuild your solution.I had the same problem. Debugging does not work with the stuff that comes with the OpenCV executable. you have to build your own binarys.
Then enable Microsoft Symbol Servers in Debug->options and settings->debug->symbols
I had the same problem. It turns out that, compiling a project I got from someone else, I haven't set the correct StartUp project (right click on the desired startup project in the solution explorer and pick "set as StartUp Project"). Maybe this will help, cheers.
Had the same problem here but a different solution worked.
First, I tried the following, none of which worked:
Load symbols as suggested by seanlitow
Remove/Add reference to PresentationFramework and PresentationCore
The solution was to undo the last few changes I had made to my code. I had just added a couple radio buttons and event handlers for checked and unchecked events. After removing my recent changes everything compiled. I then added my exact changes back and everything compiled properly. I don't understand why this worked - only thing I can think of is a problem with my VS Solution. Anyway, if none of the other suggestions work, you might try reverting back your most recent changes. NOTE: if you close & re-open Visual Studio your undo history is lost.. so you might try this before you close VS.