Question

I'm painfully debugging a legacy VS 6.0 MFC app, and I'd really like to step into MFC code. Now, the code did ship with VS6, and the symbols (mfc42.pdb) too, but the debugger asserts

'Symbols loaded (source information stripped)'

upon attaching. By these tips, all copies of mfc42.pdb on my machine are indeed stripped (their size is 1.5M-2M, nowhere near 10M). I get meaningful stacks, but am not able to step in MFC code.

I'm currently trying to re-compile MFC to obtain codeview symbols (yes, the situation is that desparate). I tried following this nice walkthrough by Daniel Howard, but I keep bumping into the following linker errors:

... delayimp.lib Creating library ..\lib\mfc42.LIB and object ..\lib\mfc42.exp mfc42.exp : error LNK2001: unresolved external symbol "public: int __thiscall CTime::operator==(class CTime)const " (??8CTime@@QBEHV0@@Z) mfc42.exp : error LNK2001: unresolved external symbol "public: int __thiscall CTime::operator!=(class CTime)const " (??9CTime@@QBEHV0@@Z) mfc42.exp : error LNK2001: unresolved external symbol "public: int __thiscall CTime::operator<(class CTime)const " (??MCTime@@QBEHV0@@Z) mfc42.exp : error LNK2001: unresolved external symbol "public: int __thiscall CTime::operator>(class CTime)const " (??OCTime@@QBEHV0@@Z) mfc42.DLL : fatal error LNK1120: 4 unresolved externals

CTime was implemented in TIMECORE.cpp, which indeed doesn't implement such operators. I couldn't locate the operator users.

Anyone has any insight into this? Any indirect advice would be great too.

Was it helpful?

Solution

It is defined in AFX.INL in VC98\MFC\Include\AFX.INL. You've probably added only the .cpp to your project.

Stepping into MFC code is a must have. MFC code is a must see. It makes you humble and angry at the same time.

OTHER TIPS

My memory is usually pretty bad and this was a long time ago, but I seem to remember that a version of the libraries compiled and linked for debugging was one of the additional options of the VC6++ installer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top