vc2008 fatal error LNK1000: Internal error during IMAGE::BuildImage错误解决

 C++/CLI静态链接ISO C++写的动态库,当Debug版本时没有任何问题而改为Release版本后链接时报

fatal error LNK1000: Internal error during IMAGE::BuildImage错误,并弹出如下对话框:

 在Output窗体中输出如下错误:

2>e:/.../svcimagereg.h(38) : fatal error C1001: An internal error has occurred in the compiler.
2>(compiler file 'f:/dd/vctools/compiler/utc/src/p2/main.c[0x5114FCA2:0x00000028]', line 182)
2> To work around this problem, try simplifying or changing the program near the locations listed above.
2>Please choose the Technical Support command on the Visual C++
2> Help menu, or open the Technical Support help file for more information
2>LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage
2>  Version 9.00.30729.01
2>  ExceptionCode            = C0000005
2>  ExceptionFlags           = 00000000
2>  ExceptionAddress         = 5114FCA2 (51030000) "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/c2.dll"
2>  NumberParameters         = 00000002
2>  ExceptionInformation[ 0] = 00000001
2>  ExceptionInformation[ 1] = 00000028
2>CONTEXT:
2>  Eax    = 00000000  Esp    = 0012EDB0
2>  Ebx    = 049EB700  Ebp    = 0012EDCC
2>  Ecx    = 00000AD8  Esi    = 00000000
2>  Edx    = 02A69208  Edi    = 02A691F0
2>  Eip    = 5114FCA2  EFlags = 00010216
2>  SegCs  = 0000001B  SegDs  = 00000023
2>  SegSs  = 00000023  SegEs  = 00000023
2>  SegFs  = 0000003B  SegGs  = 00000000
2>  Dr0    = 00000000  Dr3    = 00000000
2>  Dr1    = 00000000  Dr6    = 00000000
2>  Dr2    = 00000000  Dr7    = 00000000

本项目以前没有任何问题,最近添加了几个抽象类的子类,C++/CLI写的库只依赖于那些抽象基类,对这些实现类没有任何直接的关连关系,也就是对于托管C++库来说是透明的。在增加这些类是对svcimagereg.h文件也没有任何改动。

双击2>e:/.../svcimagereg.h(38) : fatal error C1001: An internal error has occurred in the compiler.
行后定位到一个内联函数上,函数内部是转调vector的empty方法。

将此函数实现部分写到cpp中,也就是不定义为inline函数,build后正常。

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值