# Help! Hundreds of errors!

## Recommended Posts

Gumgo    968
My project was going fine until today... I was coding just like normal and suddenly hundreds of errors popped up! They are all things like this:
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(38): error C2039: '__non_rtti_object' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(38): error C2039: '__non_rtti_object' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(38): error C2039: '__non_rtti_object' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(38): error C2039: '__non_rtti_object' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(54): error C2039: '_Cvtvec' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(54): error C2039: '_Cvtvec' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(54): error C2039: '_Cvtvec' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(54): error C2039: '_Cvtvec' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(72): error C2039: '_Getcoll' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(72): error C2039: '_Getcoll' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(72): error C2039: '_Getcoll' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(72): error C2039: '_Getcoll' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(77): error C2039: '_Getctype' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(77): error C2039: '_Getctype' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(77): error C2039: '_Getctype' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(77): error C2039: '_Getctype' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(82): error C2039: '_Getcvt' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(82): error C2039: '_Getcvt' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(82): error C2039: '_Getcvt' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(82): error C2039: '_Getcvt' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(135): error C2039: '_Getdateorder' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(135): error C2039: '_Getdateorder' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(97): error C2039: '_Getdays' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(97): error C2039: '_Getdays' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(97): error C2039: '_Getdays' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(97): error C2039: '_Getdays' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(110): error C2039: '_Getmonths' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(110): error C2039: '_Getmonths' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(110): error C2039: '_Getmonths' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(110): error C2039: '_Getmonths' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(92): error C2039: '_Gettnames' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(92): error C2039: '_Gettnames' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(92): error C2039: '_Gettnames' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(92): error C2039: '_Gettnames' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(55): error C2039: '_Timevec' : is not a member of 'std'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(55): error C2039: '_Timevec' : is not a member of 'std'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(55): error C2039: '_Timevec' : is not a member of 'std'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo(55): error C2039: '_Timevec' : is not a member of 'std'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(36): error C2039: 'bad_cast' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(36): error C2039: 'bad_cast' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(36): error C2039: 'bad_cast' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(36): error C2039: 'bad_cast' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(37): error C2039: 'bad_typeid' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(37): error C2039: 'bad_typeid' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(37): error C2039: 'bad_typeid' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\typeinfo(37): error C2039: 'bad_typeid' : is not a member of 'operatorglobal namespace'''
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(85): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(97): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(85): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(97): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(85): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(97): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(85): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(97): error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(76): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(88): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(92): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(76): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(88): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(92): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(76): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(88): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(92): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(76): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(88): error C2059: syntax error : ','
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\xlocinfo.h(92): error C2059: syntax error : ','

I have NO idea WHY these are suddenly appearing, I tried commenting out pretty much the whole program and I can't trace it to anywhere! What are these files used for, and why might this be happening? Help!!!

##### Share on other sites
Aardvajk    13207
typeinfo.h is probably to do with RTTI and xlocinfo, I would guess, is something to do with locales.

I think it would help if you could post a minimal example of the code that causes all these errors. Upgrading to VC8 (via VC2005 Express for free) would be a good idea as well, if I'm reading your paths correctly.

##### Share on other sites
jpetrie    13104
Quote:
 I was coding just like normal and suddenly hundreds of errors popped up!

You changed something.

The likely culprits, without knowing more, are an include file -- you've either added a new one, or left a trailing syntax error at the end of one of your own files that is included before a system header -- and/or you've made a change to the project settings.

For the former case, at least, you should examine your included files for common typos -- missing semicolons, forgetting to close (or closing too early) a namespace or class scope, missing #endif directive, et cetera.

If you can't figure it out, post the contents of one of your translation units.

##### Share on other sites
riku    194
All or most of the errors above were related to RTTI (runtime type information) in some way. I guess that you have somehow disabled RTTI in your compiler options.

-Riku

##### Share on other sites
Gumgo    968
Sorry for the briefness of that first post, I wanted to get it in before I had to go to school.

Anyways, I tried commenting every file in the game and then uncommenting one at a time to see if I could locate where the errors were coming from. I think I found the file (Script.h) but the weird thing is that it doesn't give the errors if I comment out some of the #includes at the beginning of the script. I can't figure out which ones though because it seems that certian combinations of commented #includes do it but other's don't (maybe it isn't just one?). I also commented out all the newest code I'd written since before the errors but that didn't fix it.

The only thing other than code that I can think of is that before I went to bed last night, I tried compiling it once in release mode, then changed it back to debug. When I woke up... it didn't work.

I'll try some more to fix it when I can...

##### Share on other sites
Todo    451
If you are using Visual Studio 7 or up and a precompiled header, try cleaning and completely rebuilding the solution. MSVS sometimes chokes when tiny bits change without affecting header inclusion.

I hope it's as easy as I think it is ;-).

##### Share on other sites
smitty1276    560
I had a problem like that once... commenting out includes and blocks of code didn't seem to exhibit any consistent symptoms at all....

#ifndef MYCLASS_H#define MYCLASS_H#include <something>class MyClass{private:   int blah1;   int blah2;public:   MyClass();   ~MyClass();      void DoSomething();};s#endif

That 's' took me forever to track down. I'm sure I was trying to type in a URL or something in IE, but the focus was still in visual studio and I got a character off before noticing that I wasn't typeing in the address bar.

##### Share on other sites
Gumgo    968
Ty for all the responses. I'll try a clean build (didn't think of that). If that doesn't work I'll check for little errors (like a ; left off), though I already did look around for those for quite a while, and the strange thing seems that if I have everything (in the entire program) commented out except for a few #includes in one area it still throws the errors (basically I'm thinking it isn't with my code)...

Okay, the errors don't appear if I comment out these:

#include "Loop.h"
#include "Renderer.h"

Of course, everything else doesn't work either and this isn't of much use because you don't know what is in Objects.h and Renderer.h. If I comment out just one or the other though, they still occurr.

The thing is... I'm sure I didn't change a thing in either of those files since last night, or this morning.

EDIT: This is REALLY starting to irritate me! I swear, I only worked a little bit on one part of the code, but now this keeps happening and I can't even figure out where it is coming from! I guess I'll try commenting out each function to see if it is caused by one of those...

EDIT: This must be what people have to do in hell... debug these problems. I've been following a "train" of files, letting it include only one other file at a time and "tracing" the order in which it compiles. The problem is... I hit a dead end. Is <vector> and <map> bad to include next to each other or something? Because it seems that if I randomly comment and uncomment different includes, it works.

OK this is getting even weirder... it seems that it MIGHT have to do with vectors and maps and multimaps. If I comment out those it seems to not throw errors!

EDIT: OOOOOOOKAY!!! The source of my problem seems to be <vector> and <map>!! If I comment out ALL <vector> and <map> includes it does not give those errors, but my game doesn't work at all of course! Why might this be!

[Edited by - Gumgo on May 9, 2007 9:53:30 PM]