4

I tried to compile a project with Visual Studio 6 SP6 and got the following:

usbcore.h(18) : 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

Line 18 of usbcore.h contains the include directive:

18: #include "usbiface.h"

Empty or non-existing usbiface.h produces the same error. I commented this line and got the same error but for the next include file.

To sum this up: the compiler error occurs for each #include directive that refers to the common project headers.

Sergey Podobry
  • 7,101
  • 1
  • 41
  • 51
  • I appreciate that you probably struggled for a long time to figure this out. But if you are going to ask a question for the specific purpose of answering it yourself, I'd like to see quite a bit more detail, especially in the question. -1 until then. – John Dibling Jul 03 '13 at 15:26
  • Also voting to close on its own merits as being unclear. As asked, there is not enough information to answer this question. – John Dibling Jul 03 '13 at 15:27
  • 1
    @John Dibling: What details are you missing? I want to share info about the compiler error to save someone's time because I spent a day trying to figure it out. – Sergey Podobry Jul 03 '13 at 20:58

5 Answers5

3

I figured out what caused that error. One of the include paths (passed to a compiler with the /I switch) had a trailing backslash.

The compiler cmdline is: CPP /nologo /MT /W3 /GX /Zi /Od /I "$(ZLIB_PATH)" /I "..\headers"

and ZLIB_PATH had a trailing backshlash. Removing that backslash solved the problem.

Sergey Podobry
  • 7,101
  • 1
  • 41
  • 51
3

In my case, changing the tag WholeProgramOptimizationtrue from true to false fixed the problem.

1

I ran into this problem when I left the parenthesis off of the definition of a ctor. It was a stupid error but it was very taxing to check out all of these tough fixes. So I just offer this as a possibility. I would not have expected an internal compiler error.

dougM
  • 77
  • 1
  • 8
0

In my case (VC6.0 SP6a), it is due to the confusing using statement. It seems the compiler can't determine whether I'm defining Foo::Bar or Bar (in global namespace).

namespace Foo {
    class Bar;
}

using Foo::Bar;

class Bar {
};
raymai97
  • 806
  • 7
  • 19
0

In my case I had to turn off the "Generate browse info" option to avoid this. (Project settings \ C/C++ \ General)