Hi I am using ms vs 2005 and trying to debug a dll. I added the executable using the dll to the property->debugging page. But when i try to run the debugger, this is what i get in the debug window:
'filter.exe': Loaded 'C:\Documents and Settings\Amish Rughoonundon\Desktop\thesis2\final\filter\Debug\di stanceFilter.dll', No symbols loaded.
I also noticed that the executable fails to load the dll using loadLibrary. Both dll and executable were compiled under debug configuration.
This does not happen if I use the executable and the dll directly instead of clicking on start debugging in visual studio.
The debugger actually worked one time. It stopped at a break point inside the dll but then I stopped the debugger and made some changes to the code, recompiled and it would not work again. I've been stuck since then. I have not been able to see any patterns.
Any help would be really appreciated. I do not want to go debug this thing using cout :)
Thanks a lot,
it's hard to know what's happening without knowing file locations etc, but generally this problem relates to the debugger not finding program database (.pdb) files
Just figured it out. The problem was that the executable used to start up the dll could not locate the dll. This is strange since I would expect visual studio to be smart enough to copy the dll to where the the exe was or something like that. Anyways. I solved the problem by copying the executable into the debug folder of the dll. Then go to property and point to the executable in the debug folder and voila, it works. I hope it helps other people having the same problem.
When you rebuild your exe, you'll have to copy it again, so that might not be the best solution. If the either exe or the dll never changes, then you can copy the one that doesn't change into the debug directory of the other. However, if they both change, you should change the build output directory to be the same for both. You can also change the working directory of the debug session, or change your path so that visual studio will look in the right places for the dll(s). These are better options than having to manually copy an exe or dll each time you build it.