|
-
November 1st, 2011, 02:06 AM
#4
Re: CFile::Dump causes "Unable to dump object in static release builds" error
If set a breakpoint then step into, you can notice the following in one CDumpContext::operator<<
Code:
#ifdef _AFXDLL
pOb->Dump(*this);
#else
*this << _T("Unable to dump object in static release builds");
#endif
That means in your project _AFXDLL is not defined, most possible because you are using static libraries of MFC.
To get rid of that, change "Use MFC in a Static Library" to "Use MFC in a Shared DLL", in your project properties.
Alternatively, in this particular case, you can call CFile::Dump instead of using << operator.
Code:
// afxDump << file; // <-- replace this.
file.Dump(afxDump);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|