Jump to content
  • Advertisement
Sign in to follow this  
MikeWW

SOLVED - VC++7.1 - Internal Compiler Error Strangeness

This topic is 4501 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!