debug dll

This is a discussion on debug dll within the C++ Programming forums, part of the General Programming Boards category; Hi I am using ms vs 2005 and trying to debug a dll. I added the executable using the dll ...

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    205

    debug dll

    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,
    Amish

  2. #2
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    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
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    205
    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.
    Amish

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    7,338
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. non-MFC DLL with MFC app question.
    By Kempelen in forum Windows Programming
    Replies: 10
    Last Post: 08-20-2008, 07:11 AM
  2. Error C2664 - Trying to call an external Dll
    By jamez05 in forum C++ Programming
    Replies: 3
    Last Post: 08-08-2006, 06:07 AM
  3. DirectX dll Final Debug and Final Retail
    By hdragon in forum Tech Board
    Replies: 0
    Last Post: 11-15-2005, 08:46 PM
  4. dll communicating between each other
    By cloudy in forum C++ Programming
    Replies: 5
    Last Post: 06-17-2005, 02:20 AM
  5. DLL and std::string woes!
    By Magos in forum C++ Programming
    Replies: 7
    Last Post: 09-08-2004, 12:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21