I have an MFC C++ project compiler under Visual Studio 2008.
I'm adding a _AFX_NO_DEBUG_CRT in my stdafx.h before the #include to avoid all the debug new and deletes that MFC provides (I wish to provide my own for better cross platform compatibility).
However when I do this I get a stream of errors such as the following:
>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2059: syntax error : '__asm'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2143: syntax error : missing ')' before '{'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2143: syntax error : missing ')' before '{'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2143: syntax error : missing ')' before '{'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : warning C4091: '' : ignored on left of 'int' when no variable is declared
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2143: syntax error : missing ';' before 'constant'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2143: syntax error : missing ';' before '}'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2143: syntax error : missing ';' before ','
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2059: syntax error : ')'
1>c:\program files\microsoft visual studio 9.0\vc\atlmfc\include\afxtls_.h(62) : error C2059: syntax error : ')'
1
I "think" it may have something to do with an __asm int 3 call but I cannot be sure. Has anyone had this problem before? If so, how did you fix it? Am i stuck with MFC's memory tracking? I really hope not because it will make my libraries a lot less cross platform :(
Any help would be hugely appreciated!