0

I am working on a project which is in release build. I can't work on debug build for certain reason.

In the Release build, can I instruct Visual Studio to link against debug version of MFC DLLs, so I can step into MFC source code? If yes, how could I do it?

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Sheen
  • 3,333
  • 5
  • 26
  • 46

1 Answers1

1

You are voiding the warranty doing this. It seemed to work okay though when I tried it on a sample MFC app. Project + Properties, Linker, Command line is where to get started. First put /VERBOSE in there and rebuild the project to see what .libs get linked right now. You need to use /NODEFAULTLIB to disable the release versions of the .libs and add the debug versions of the .libs. You also need to switch the CRT version, /MTd or /MDd depending on which one you use, Project + Properties, C/C++, Code generation, Runtime library.

Using VS2008 I ended up with these linker settings:

/VERBOSE /NODEFAULTLIB:mfc90u.lib /NODEFAULTLIB:mfcs90u.lib mfc90ud.lib mfcs90ud.lib

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Good answer, +1. I'm learning MFC as I go along, so I was kind of going for the "extra credit" question in trying to answer this one. I wouldn't have guessed to specify the .libs manually. – Cody Gray - on strike Feb 25 '11 at 04:18