Sign in to follow this  
MikeWW

SOLVED - VC++7.1 - Internal Compiler Error Strangeness

Recommended Posts

While working on my current project in VS7.1 (VC++) I found that a recompile failed with the dreaded "C1001: INTERNAL COMPILER ERROR" error. After some investigation I found that this error occured where ever the class "cFizWorld" was defined or declared. The strange thing is that if I rename "cFizWorld" to "cFizWorld2" in all relavent files the error goes away. Searching for "cFizWorld" in my source files gives no references to anything that could cause this. I have tried cleaning the project and doing a total rebuild, deleting all VS & VC++ created intermediate files and similar (NCBs etc...), reseting the machine and giving tribute to Papa Ghede all with no avail... ;) Often, with a little bit of lateral thinking you can make these kind of weird errors go away but I just can't seem to crack this. I assume there must be some state relating to the name "cFizWorld" being stored somewhere that has become corrupt but I just can't find where. Unfortunately the project is not in source control currently (idiot!) so I am rolling back my changes since the last known working build slowly manually but nothing seems to be affecting it. Any ideas would be *gratefully* appreciated! Thanks, Mike. EDIT: After an hour+ of working on it a couple of minutes after I posted this I solved it. When I said "Searching for "cFizWorld" in my source files gives no references to anything that could cause this" I was lying. In an outlying file that should never have referenced cFizWorld I found a typedef (of a templated smart ptr class) was named cFizWorld by accident. So: Defining a typedef specialisation of a templated class with the same name as a class that will be defined later in the compilation will give you a internal compiler error - sometimes.

Share this post


Link to post
Share on other sites
This probably isn't that your problem is, but I recall MSVC 7.1 barfing on me when I used the keyboard 'class' rather than 'struct' to forward declare some types used in the SDL library. For example, I used 'class SDL_Event' in a header file, and the compiler did not like that very much, probably because SDL_Event is declared as a struct.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this