Click to See Complete Forum and Search --> : HELP!!!! --- INTERNAL COMPILER ERROR


t_ramesh
April 20th, 1999, 02:34 PM
Hi gurus,

I am trying to extract some phrases from a text file by processing it line by line. i am using cstdiofile and CString member functions for accomplishing this. i wrote a function which has more of CString methods such as mid, left, getlength etc. after that when i tried to compile i got a error after corecting some couple of syntax errors. the following is the error list.

--------------------Configuration: DataRepair - Win32 Debug--------------------
Compiling...
RepairDataDialog.cpp
C:\users\rkt5\project\tobacco\DataRepair\RepairDataDialog.cpp(172) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
Error executing cl.exe.

DataRepair.exe - 1 error(s), 0 warning(s)


@@@@@@@@@@@@@@
i don't know what exactly the problem. i tried looking into knowledge base of microsft support.. but everthing says that bug has been fixed after vc++1.5 version.

regards
ramesh

Paul McKenzie
April 20th, 1999, 02:48 PM
This usually means that
- You have a syntax error, but the error caused the compiler's parser to mess up.

- You don't have a syntax error, but the compiler does have an internal error.

It's most likely the first. I would comment out portions of the code until the error goes away. Start out with whole function blocks. Once the error goes away, uncomment and recompile until the error returns. This will pinpoint the line(s) of code that are producing this error.

Regards,

Paul McKenzie

April 21st, 1999, 12:57 PM
This is the "help I'm confused" message. The compiler has recognized that there is
a problem someplace, but is too confused to be able to tell you what it is. Often, the
problem is at some distance from where the compiler found itself in trouble.

Many times it is something silly or seemingly easy for the compiler to spot.
Things like unbalanced brackets, missing ; or a double colon :: when a single :
is required, or the other way around. And many times, the same exact bug
will be caught in another code context, but give you this message in specific
specially "magic" contexts.

The divide-and-conquer trick usually works. Take out half the code and see if the
problem is still there. Then look at half the code that has the error, and so on.
Especially try commenting out header files one at a time. Remember that if you
are cutting the code roughly in half each time, you can get the buggy line from
a million lines of code in only 20 tries or so. Plus, cutting the code often will change
the context so the bug is reported in a more understandable fashion.

Some tricks to avoid this in the future:
- When you open a bracket, do not type anything inside until you put in the
closing bracket. This will reduce the chances of unbalanced brackets.
- Make yourself some "boilerplate" for creating the common things you
create like class definitions and so on. Don't type these in by hand, cut
and paste them. That way you will get fewer missing ; type errors.
- Pick an indentation style that works for you so you can quickly pick out
where things start and end.
- Make use of the "jump to balancing bracket" feature, I think it's <Ctrl>]
(control right square bracket).