项目本来是能正常编译的,但是突然出现“fatal error C1001: 编译器中发生内部错误。”
2> (编译器文件“f:\dd\vctools\compiler\utc\src\p2\main.c”,第 255 行)
2> 要解决此问题,请尝试简化或更改上面所列位置附近的程序。
2> 请选择 Visual C++
2> “帮助”菜单上的“技术支持”命令,或打开技术支持帮助文件来获得详细信息。
2> link!InvokeCompilerPass()+0x29a14
2> link!InvokeCompilerPass()+0x29cb2
2> link!InvokeCompilerPass()+0x29d84
2> link!InvokeCompilerPass()+0x294ba
2> link!InvokeCompilerPass()+0x2973f
2> link!DllGetC2Telemetry()+0xe3108
2> link!CloseTypeServerPDB()+0x14fd
2>
2>
2>LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage
2>
2> Version 14.00.24215.1
2>
2> ExceptionCode = C0000005
2> ExceptionFlags = 00000000
2> ExceptionAddress = 7BD2DFAA (7B980000) "F:\Microsoft Visual Studio 14.0\VC\bin\c2.dll"
2> NumberParameters = 00000002
2> ExceptionInformation[ 0] = 00000000
2> ExceptionInformation[ 1] = 0000002C
2>
2> CONTEXT:
2> Eax = 00000000 Esp = 00B3EA88
2> Ebx = 00000001 Ebp = 00B3EAA8
2> Ecx = 27C07054 Esi = 2DAB8EAC
2> Edx = 27C07054 Edi = 2DAB8EA0
2> Eip = 7BD2DFAA EFlags = 00010246
2> SegCs = 00000023 SegDs = 0000002B
2> SegSs = 0000002B SegEs = 0000002B
2> SegFs = 00000053 SegGs = 0000002B
2> Dr0 = 00000000 Dr3 = 00000000
2> Dr1 = 00000000 Dr6 = 00000000
2> Dr2 = 00000000 Dr7 = 00000000
查找资料之后,有人说项目属性,图里的配置项改为图中的值,试了一下确实可以了。特此记录。
参考:unique ptr - C++ fatal error C1001: An internal error has occurred in the compiler - Stack Overflow