tons of awful errors
-
My program has gone psycho, and I'd really appreciate some help reducing the 115 compilation errors down to none :-D The problem is with the VC++ generated line: static char THIS_FILE[] = __FILE__; that is placed in every cpp file. For some reason, this is giving me serious errors in every class! Looks something like this: error C2258: illegal pure syntax, must be '= 0' error C2252: 'THIS_FILE' : pure specifier can only be specified for functions error C2838: illegal qualified name in member declaration error C2059: syntax error : 'return' error C2238: unexpected token(s) preceding ';' error C2143: syntax error : missing ';' before '*' error C2501: 'GetMessageMap' : missing storage-class or type specifiers error C2556: 'int *__thiscall CTestApp::GetMessageMap(void) const' : overloaded function differs 43) : see declaration of 'GetMessageMap' error C2373: 'GetMessageMap' : redefinition; different type modifiers 43) : see declaration of 'GetMessageMap' error C2143: syntax error : missing ';' before 'tag::id' error C2734: 'AFX_MSGMAP' : const object must be initialized if not extern error C2371: 'AFX_MSGMAP' : redefinition; different basic types p(38) : see declaration of 'AFX_MSGMAP' fatal error C1004: unexpected end of file found Every one of those errors points to the BEGIN_MESSAGE_MAP macro. Needless to say, this is the lamest thing ever, and I don't have a clue what caused all this craziness. Any help is much needed X| thanks a ton, Jake
-
My program has gone psycho, and I'd really appreciate some help reducing the 115 compilation errors down to none :-D The problem is with the VC++ generated line: static char THIS_FILE[] = __FILE__; that is placed in every cpp file. For some reason, this is giving me serious errors in every class! Looks something like this: error C2258: illegal pure syntax, must be '= 0' error C2252: 'THIS_FILE' : pure specifier can only be specified for functions error C2838: illegal qualified name in member declaration error C2059: syntax error : 'return' error C2238: unexpected token(s) preceding ';' error C2143: syntax error : missing ';' before '*' error C2501: 'GetMessageMap' : missing storage-class or type specifiers error C2556: 'int *__thiscall CTestApp::GetMessageMap(void) const' : overloaded function differs 43) : see declaration of 'GetMessageMap' error C2373: 'GetMessageMap' : redefinition; different type modifiers 43) : see declaration of 'GetMessageMap' error C2143: syntax error : missing ';' before 'tag::id' error C2734: 'AFX_MSGMAP' : const object must be initialized if not extern error C2371: 'AFX_MSGMAP' : redefinition; different basic types p(38) : see declaration of 'AFX_MSGMAP' fatal error C1004: unexpected end of file found Every one of those errors points to the BEGIN_MESSAGE_MAP macro. Needless to say, this is the lamest thing ever, and I don't have a clue what caused all this craziness. Any help is much needed X| thanks a ton, Jake
If you have any inline functions in your header file, make sure they have a matching {} pair. If you use an ")" instead of a "}", you'll get all kinds of bizarre errors. Also, make sure the statement inside the "{}" pair ends with a semi-colon. Lastly, if this is an abstract class, make sure you've completed the definitions inside the class header. If you're deriving forom an abstract class, the pure virtual functions have to be prototyped AND have a body.
-
If you have any inline functions in your header file, make sure they have a matching {} pair. If you use an ")" instead of a "}", you'll get all kinds of bizarre errors. Also, make sure the statement inside the "{}" pair ends with a semi-colon. Lastly, if this is an abstract class, make sure you've completed the definitions inside the class header. If you're deriving forom an abstract class, the pure virtual functions have to be prototyped AND have a body.
Sweet Jesus it actually worked! I had a non-inline function without the semicolon, and the compiler wasn't happy. Thanks a ton! :) Jake