Answered by:
VS2015 LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage

Question
-
I'm trying to build a C++ application with Visual Studio Communnity 2015.
I can build it in Debug mode without errors, but in Release mode I get this error:
1>LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage
1>
1> Version 14.00.23506.0
1>
1> ExceptionCode = C0000005
1> ExceptionFlags = 00000000
1> ExceptionAddress = 55324214 (55140000) "E:\Programmi (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\c2.dll"
1> NumberParameters = 00000002
1> ExceptionInformation[ 0] = 00000000
1> ExceptionInformation[ 1] = 00000030
1>
1> CONTEXT:
1> Eax = 00000000 Esp = 004FE430
1> Ebx = 00000000 Ebp = 004FE458
1> Ecx = 05197DE4 Esi = 00000000
1> Edx = 00000000 Edi = 0994308C
1> Eip = 55324214 EFlags = 00010246
1> SegCs = 00000023 SegDs = 0000002B
1> SegSs = 0000002B SegEs = 0000002B
1> SegFs = 00000053 SegGs = 0000002B
1> Dr0 = 00000000 Dr3 = 00000000
1> Dr1 = 00000000 Dr6 = 00000000
1> Dr2 = 00000000 Dr7 = 00000000After a web search I've found this error in other Visual Studio versions (e.g. 2008 and 2010), caused by a bug in VS and I've found the hotfix for those versions. Unfortunately I didn't found a hotfix for Visual Studio 2015.
How can I solve this problem?
Thank you
Answers
-
Hi.
This is the link of the VS solution
https://onedrive.live.com/redir?resid=C333E56C81DC26DC!135&authkey=!AA-W_rYXq-hcm04&ithint=file%2czip
Thank you
Hi,
Thank you for posting your code.
I have tested your code. I can reproduce your issue.
>>After a web search I've found this error in other Visual Studio versions (e.g. 2008 and 2010), caused by a bug in VS and I've found the hotfix for those versions. Unfortunately I didn't found a hotfix for Visual Studio 2015
Accordingtoyour description. You can repair your issue on other Visual Studio versions. But on vs 2015 version you can’t deal the issue. You can post the issue on connect.
Best Regards,
Hart
- Proposed as answer by Hart WangModerator Tuesday, February 23, 2016 9:46 AM
- Marked as answer by Hart WangModerator Wednesday, February 24, 2016 8:47 AM
All replies
-
Hi,
Thanks for posting here.
Could you please provide your reproducing demo for us to test on our side? You can upload the project to OneDrive and feedback the link here.
Best Regards,
May
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Edited by May Wang - MSFT Friday, February 12, 2016 7:33 AM
-
-
Hi.
This is the link of the VS solution
https://onedrive.live.com/redir?resid=C333E56C81DC26DC!135&authkey=!AA-W_rYXq-hcm04&ithint=file%2czip
Thank you
Hi,
Thank you for posting your code.
I have tested your code. I can reproduce your issue.
>>After a web search I've found this error in other Visual Studio versions (e.g. 2008 and 2010), caused by a bug in VS and I've found the hotfix for those versions. Unfortunately I didn't found a hotfix for Visual Studio 2015
Accordingtoyour description. You can repair your issue on other Visual Studio versions. But on vs 2015 version you can’t deal the issue. You can post the issue on connect.
Best Regards,
Hart
- Proposed as answer by Hart WangModerator Tuesday, February 23, 2016 9:46 AM
- Marked as answer by Hart WangModerator Wednesday, February 24, 2016 8:47 AM
-
Hello, I have a similar issue. The solution compiles without issue in Debug build however so the problem may be some link or compiler parameter?
Edit: yes to my question above: changing the "Link Time Code Generation" to "Default" instead of "/LTCG" does allow the link to complete without error.
3>LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage
3>
3> Version 14.00.23506.0
3>
3> ExceptionCode = C0000005
3> ExceptionFlags = 00000000
3> ExceptionAddress = 50888AC6 (50790000) "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\c2.dll"
3> NumberParameters = 00000002
3> ExceptionInformation[ 0] = 00000000
3> ExceptionInformation[ 1] = 00000036
- Edited by YCoder Tuesday, March 8, 2016 9:19 AM
-
Whether or not it is relevant to the code of the original poster, I ran into this same error on Visual Studio 2015, and it was a one line of code difference.
std::stringstream ss;
I added this single line to my existing .cpp code, and it complied and linked under DEBUG
But when I build for Release, it complies, but throws 3 LINK errors
Error C1001 An internal error has occurred in the compiler.
Error C1001 An internal error has occurred in the compiler.
Error LNK1000 Internal error during IMAGE::BuildImage