fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 1794)

天涯浪子 提交于 2019-12-06 03:37:53

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

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.

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.

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 {
};
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!