Sign in to follow this  
UltimaX

Internal Compiler Error

Recommended Posts

fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1794) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information I have never seen this error before and it has me baffled. This error only occurs in release mode. I did some research, via google, and found a few different sites regarding this. Microsoft states the following, “When you use large macros in Microsoft Visual C++ 6.0 and you compile the project, you may receive the following error message: fatal error C1001: INTERNAL COMPILER ERROR” and they suggest downloading SP6. I downloaded it (60+ MB), installed it, and it did not resolve the issue. Another site suggests, “When template classes or template class header files are included in a precompiled header file, the compiler may generate the following error for files that use the precompiled header: “, which also did not resolve the issue. Finally, this site suggests that it is from using the following to include header files, “#include "../../myother/dir/foo.h" and the work around would be to use “#include <foo.h>” and add the include path to the compiler settings. The third option worked, but I was wondering if there is a work around for this? Has anyone ran into this bug? I have the following: #include "..\P25D Version System\P25D_VersionManager.h", but if I use #include <P25D_VersionManager.h> and add the include path to the compiler settings then it will compile in release mode. Can someone please give me some advice or a solution to this problem? I would greatly appreciate it.

Share this post


Link to post
Share on other sites
You should probably include what version of the Visual C++ compiler you're using... there's a lot of different versions, after all :-). Are you using 6.0, as hinted at by the quote?

VS6 has a ton of problems... I'd suggest upgrading, personally. (You can get the VS 2005 beta compiler, or something, free online - don't have the link myself, ask someone else :p).

I personally use the GNU C/C++ Compilers - ported to windows in the MinGW and Cygwin projects, and for an IDE I use Eclipse with the CDT Plugin (for C/C++ Development).

Share this post


Link to post
Share on other sites
"internal compiler error" means that the compiler crashed (segfaulted) internally, and they used structured exception handling to catch it, and return an error.

With MSVC 7.0 and 7.1, I've found that this most often happens when you have errors in your template instantiations. There seems to be a problem where it wants to complain about the wrong argument (one or two arguments too "early") and if the first argument is at fault, it attempts to complain about argument -1, which is likely to lead it down a bad pointer and segfault.

Cut your code in half by using #if 0 to see which half crashes. Then cut that part in half, ... until you've narrowed down the problem to a single line of code. Figure out what's wrong with that line, and fix it (or just re-formulate it) and you'll be going again.

Share this post


Link to post
Share on other sites
Bear in mind that this error can be encountered whilst compiling valid c++ code. About 90% of the time I encounter this error it can usually be removed by doing a clean build.

The rest of the time it's always been dodgy template stuff.

Share this post


Link to post
Share on other sites
Sometimes this error happens to me too.... and 99.999% of the times because of things i don't understand. Sometimes i have code compiled and running, add a printf or change something in a cycle abd boom.... it shows sup. And it has nothing to do with templates, at least in my case.

Like Nitage said, making a clean rebuild works most of the time. When that doesn't work, re-starting visual studio and then making a clean build works.

Share this post


Link to post
Share on other sites
A small note, you might want to use forward slashes when including files, as that is platform independent.

I second going for the Visual C++ Express Beta 2 as well. It's free, and the compiler is extremely well compliant with the standards. Linky

Share this post


Link to post
Share on other sites
Thanks for all of the replies, I will try them ASAP.

I have Visual Studio 2005, I just have not had a chance to play with it yet. I have been too busy trying to get this project finished first.

Thanks again for all of the replies.

Share this post


Link to post
Share on other sites
I finally resolved the issue. I did a clean build and that didn't work so I just created a new project, readded all of the source files, and it built fine. That's kind of wierd considering the only thing I changed was #include <P25D_VersionManager.h> back to "..\P25D Version System\P25D_VersionManager.h".

Thanks again for all of the suggestions.

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