----Configuration: canvas - Win32 Debug--------------------
Compiling...
canvasFrame.cpp
d:\microsoft visual studio\vc98\include\crtdbg.h(536) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
d:\microsoft visual studio\vc98\include\crtdbg.h(536) : error C2059: syntax error : 'newline'
d:\microsoft visual studio\vc98\mfc\include\afx.h(674) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
d:\microsoft visual studio\vc98\mfc\include\afx.h(674) : error C2059: syntax error : 'newline'
d:\microsoft visual studio\vc98\mfc\include\afx.h(674) : error C2238: unexpected token(s) preceding ';'
d:\microsoft visual studio\vc98\mfc\include\afx.h(675) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
d:\microsoft visual studio\vc98\mfc\include\afx.h(675) : error C2059: syntax error : 'newline'
d:\microsoft visual studio\vc98\mfc\include\afx.h(675) : error C2238: unexpected token(s) preceding ';'
d:\microsoft visual studio\vc98\mfc\include\afx.h(683) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
d:\microsoft visual studio\vc98\mfc\include\afx.h(683) : error C2059: syntax error : 'newline'
d:\microsoft visual studio\vc98\mfc\include\afx.h(683) : error C2238: unexpected token(s) preceding ';'
d:\microsoft visual studio\vc98\mfc\include\afx.h(1631) : error C2833: 'operator DEBUG_NEW' is not a recognized operator or type
d:\microsoft visual studio\vc98\mfc\include\afx.h(1631) : error C2059: syntax error : 'newline'
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(122) : error C2059: syntax error : 'string'
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(123) : error C2091: function returns function
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(123) : error C2802: static member 'operator new' has no formal parameters
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(123) : error C2333: 'new' : error in function declaration; skipping function body
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : error C2059: syntax error : 'string'
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : error C2091: function returns function
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : error C2802: static member 'operator new' has no formal parameters
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(135) : error C2059: syntax error : 'string'
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(135) : error C2091: function returns function
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(135) : error C2556: 'void *(__cdecl *__stdcall CNoTrackObject::operator new(void))(unsigned int,const char *,int)' : overloaded function differs only by return type from 'void *(__cdecl *__stdcal
l CNoTrackObject::operator new(void))(unsigned int)'
d:\microsoft visual studio\vc98\mfc\include\afxtls_.h(131) : see declaration of 'new'
g:\我的……\temp\游戏框架2\canvasframe.cpp(17) : fatal error C1903: unable to recover from previous error(s); stopping compilation
执行 cl.exe 时出错.
canvasFrame.obj - 1 error(s), 0 warning(s)
请问;
我该如何解决这个问题呢?
这个问题又是怎么出现的呢?
3 个解决方案
#1
应该是什么文件将#include写在下面的几行后面了,将#include移至它之前?
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#2
这个错误是VC的一个BUG, 甚至你只需要把
/*
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
*/
注释掉, 然后编译一遍, 然后再把注释去掉,就没事了。
/*
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
*/
注释掉, 然后编译一遍, 然后再把注释去掉,就没事了。
#3
应该是什么文件将#include写在下面的几行后面了,将#include移至它之前?
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
---------------------------------------------
没有啊!
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
---------------------------------------------
没有啊!
#1
应该是什么文件将#include写在下面的几行后面了,将#include移至它之前?
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#2
这个错误是VC的一个BUG, 甚至你只需要把
/*
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
*/
注释掉, 然后编译一遍, 然后再把注释去掉,就没事了。
/*
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
*/
注释掉, 然后编译一遍, 然后再把注释去掉,就没事了。
#3
应该是什么文件将#include写在下面的几行后面了,将#include移至它之前?
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
---------------------------------------------
没有啊!
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
---------------------------------------------
没有啊!