Fatal error lnk1000 internal error during image buildimage

Fixes an issue in which you receive fatal error LNK1000 when you build a Visual C++ project in Visual Studio 2012 or in Visual Studio 2010.

Visual Studio 2012 Update 4 Visual Studio Premium 2012 Visual Studio Ultimate 2012 Visual Studio Professional 2010 Visual Studio Premium 2010 Visual Studio Ultimate 2010 More…Less

Symptoms

Assume that you have installed Microsoft Visual Studio 2010 Service Pack 1 (SP1) or Visual Studio 2012 Update 4 on your computer. After that if you build a Visual C++ project, Visual Studio may crash during LINK, and you may receive the following error message:

link -OUT:_out/disp+work.exe -PDB:_out/disp+work.pdb -MANIFESTFILE:<yourmanifest>.mf @<yourexe>.exe.lcf -PROFILE -NXCOMPAT -STACK:0x2000000 -SWAPRUN:NET -DEBUG -OPT:REF -DEBUGTYPE:CV,FIXUP -MACHINE:amd64 -nologo _out/<yourlib>.exp ole32.lib rpcrt4.lib oleaut32.lib oledb.lib uuid.lib kernel32.lib advapi32.lib user32.lib gdi32.lib winspool.lib ws2_32.lib Iphlpapi.lib netapi32.lib comdlg32.lib shell32.lib dbghelp.lib version.lib mpr.lib secur32.lib -ltcg:pgu -pgd:<yourpdg>.pgd

PGOMGR : warning PG0188: No .PGC files matching ‘*pgc’ were found.
_out/<yourlib>.exp : warning LNK4042: object specified more than once; extras ignored
Generating code
<sourcefile>.c : fatal error C1001: An internal error has occurred in the compiler.
(compiler file ‘f:ddvctoolscompilerutcsrcp2main.c[0x000007FEEE648E16:0x00000004E45E24B0]’, line 183)
To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information

LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage

Version <Link version in Visual Studio 2010 or in Visual Studio 2012>

ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 000007FEEE648E16 (000007FEEE490000) «C:Program Files (x86)Microsoft Visual Studio 10.0VCBINamd64c2.dll»
NumberParameters = 00000002
ExceptionInformation[ 0] = 0000000000000000
ExceptionInformation[ 1] = 00000004E45E24B0

CONTEXT:
Rax = 0000000087035F78 R8 = 0000000000000000
Rbx = 0000000000000000 R9 = 0000000000000000
Rcx = 000000013FB80050 R10 = 0000000000000000
Rdx = 000000001C8E5688 R11 = 0000000000000286
Rsp = 00000000001FE1A0 R12 = 000000008FD02A28
Rbp = 0000000087035F18 E13 = 0000000000000000
Rsi = 0000000000000000 R14 = 000000003A2FB1B9
Rdi = 00000004E45E24B0 R15 = 000000011CB014A0
Rip = 000007FEEE648E16 EFlags = 0000000000010202
SegCs = 0000000000000033 SegDs = 000000000000002B
SegSs = 000000000000002B SegEs = 000000000000002B
SegFs = 0000000000000053 SegGs = 000000000000002B
Dr0 = 0000000000000000 Dr3 = 0000000000000000
Dr1 = 0000000000000000 Dr6 = 0000000000000000
Dr2 = 0000000000000000 Dr7 = 0000000000000000


Note The build uses Profile-Guided Optimization and the /LTCG option. If you remove the /LTCG option and the /PGD option, this issue does not occur.

Resolution

To resolve this issue, download and apply the hotfix from the following link.

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.

If the hotfix is available for download, there is a «Hotfix Download Available» section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:

Prerequisites

To apply this hotfix, you must have Visual Studio 2012 Update 4 or Visual Studio 2010 SP1 installed.

Restart requirement

You may have to restart the computer after you install the hotfix if the affected files are not being used at the time of installation. We recommend that you close all Visual Studio-related components before you install the hotfix.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the «Applies to» section.

Need more help?

I have a problem with linking in VC++ 2010. When I compile in the debug mode it’s ok, but in the release mode I regular receive the error «LNK1000: Internal error during IMAGE::BuildImage».

What am I doing wrong?

asked May 6, 2012 at 7:35

T_T's user avatar

1

It began work as soon as I have changed «Whole program optimization» option from «Use Link Time Code Generation» to «Profile Guided Optimization-Instrument».

answered May 6, 2012 at 17:01

T_T's user avatar

T_TT_T

5331 gold badge5 silver badges18 bronze badges

3

I encountered the same error. The problem in my case was that I was «playing» with the configuration properties (Project Properties -> Configuration Properties -> General)

The ‘Configuration Type’ of the project was ‘Dynamic Library (.dll)’, but the ‘Target Extension’ was .lib instead of .dll.

answered Jun 10, 2019 at 8:07

Mugurel's user avatar

1

April 2020 update

Issue with MSBuild and Docker for Windows was fixed in MSBuild 16.5 (source), so if still seeing that — just update MSVS/MSBuild to the latest version

Original answer

Check for working C compiler: C:/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "C:/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe"

  is not able to compile a simple test program.
......

LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage.FinalPhase

I was getting this error when I was running cmake in Docker for Windows inside mounted Docker volume. Solution is to copy the workspace to local Docker filesystem.

answered Dec 20, 2019 at 12:37

The Godfather's user avatar

The GodfatherThe Godfather

4,1274 gold badges37 silver badges61 bronze badges

5

In vs2019 it works for me:
Project->Property pages->Optimization->Link Time Code Generation, change from «Use Link Time Code Generation» to «Profile Guided Optimization-Instrument»

answered Jul 3, 2020 at 3:21

terwxqian's user avatar

terwxqianterwxqian

5416 silver badges7 bronze badges

  • Remove From My Forums
  • 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.0VCbinx86_amd64c2.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    = 00000000

    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.

    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

      Tuesday, February 23, 2016 9:46 AM

    • Marked as answer by
      Hart Wang
      Wednesday, February 24, 2016 8:47 AM

компилятор msvc

Кликните здесь для просмотра всего текста

9> Создание кода
9>f:cloudbot2016widgetsharedutilsmd5.cpp : fatal error C1001: Внутренняя ошибка в файле компилятора.
9> (файл компилятора «f:ddvctoolscompilerutcsrcp2main.c», строка 255)
9> Чтобы обойти эту неполадку, попытайтесь упростить или изменить программу в строках около указанной позиции.
9> Для получения дополнительных сведений выберите команду «Техническая поддержка»
9> в меню «Справка» Visual C++ или откройте файл справки технической поддержки.
9>f:cloudbot2016widgetsharedutilsmd5.cpp : fatal error C1001: Внутренняя ошибка в файле компилятора.
9> (файл компилятора «f:ddvctoolscompilerutcsrcp2main.c», строка 255)
9> Чтобы обойти эту неполадку, попытайтесь упростить или изменить программу в строках около указанной позиции.
9> Для получения дополнительных сведений выберите команду «Техническая поддержка»
9> в меню «Справка» Visual C++ или откройте файл справки технической поддержки.
9>
9>
9>
9>LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage
9>
9> Version 14.00.24215.1
9>
9> ExceptionCode = C0000005
9> ExceptionFlags = 00000000
9> ExceptionAddress = 53524AA9 (53390000) «C:Program Files (x86)Microsoft Visual Studio 14.0VCbinc2.dll»
9> NumberParameters = 00000002
9> ExceptionInformation[ 0] = 00000000
9> ExceptionInformation[ 1] = 00000001
9>
9> CONTEXT:
9> Eax = 00000000 Esp = 0045E3EC
9> Ebx = 0045E498 Ebp = 0045E408
9> Ecx = 00000001 Esi = 03BAE3B8
9> Edx = 00000001 Edi = 03BAE3B8
9> Eip = 53524AA9 EFlags = 00010202
9> SegCs = 00000023 SegDs = 0000002B
9> SegSs = 0000002B SegEs = 0000002B
9> SegFs = 00000053 SegGs = 0000002B
9> Dr0 = 00000000 Dr3 = 00000000
9> Dr1 = 00000000 Dr6 = 00000000
9> Dr2 = 00000000 Dr7 = 00000000

всё шло хорошо, в один прекрасный момент проект перестал собраться.
debug версия собирается нормально.
пробовал всё подряд — от отключения оптимизаций и отката проекта на несколько дней назад до переустановки студии.
исключение md5 h/cpp не помогает — начинает валиться на другом файле.
в проекте порядка полусотни файлов, я даже не знаю как найти, где собака зарыта (и откуда она вообще взялась?).

У меня проблема с линковкой в ​​VC++ 2010. При компиляции в режиме отладки все нормально, но в режиме релиза я регулярно получаю ошибку «LNK1000: Внутренняя ошибка во время IMAGE::BuildImage».

Что я делаю не так?

4 ответы

Он начал работать, как только я изменил параметр «Оптимизация всей программы» с «Использовать генерацию временного кода ссылки» на «Инструмент оптимизации с управлением по профилю».

ответ дан 06 мая ’12, 18:05

Я столкнулся с той же ошибкой. Проблема в моем случае заключалась в том, что я «играл» со свойствами конфигурации (Свойства проекта -> Свойства конфигурации -> Общие)

«Тип конфигурации» проекта был «Динамическая библиотека (.dll)», но «Целевым расширением» был .lib вместо .dll.

Создан 10 июн.

Апрель 2020 обновление

Проблема с MSBuild и Docker для Windows была исправлена ​​в MSBuild 16.5 (источник), поэтому, если вы все еще видите это, просто обновите MSVS/MSBuild до последней версии.

Оригинальный ответ

Check for working C compiler: C:/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe -- broken
CMake Error at C:/Program Files/CMake/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "C:/BuildTools/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe"

  is not able to compile a simple test program.
......

LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage.FinalPhase

Я получал эту ошибку, когда я бежал cmake в Docker для Windows внутри установленный Объем докера. Решение — скопировать рабочую область в локальную файловую систему Docker.

ответ дан 02 апр.

В vs2019 у меня работает:
Проект-> Страницы свойств-> Оптимизация-> Генерация временного кода ссылки, измените с «Использовать генерацию временного кода ссылки» на «Инструмент оптимизации на основе профиля»

Создан 03 июля ’20, 04:07

Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками

visual-studio-2010
visual-c++
hyperlink

or задайте свой вопрос.

I am trying to recompile solution file for memcached project on Windows 7 64 bit with Visual Studio 2008 and got the following error:

1>LINK : fatal error LNK1000: Internal error during IncrBuildImage
1>  Version 9.00.21022.08
1>  ExceptionCode            = C0000005
1>  ExceptionFlags           = 00000000
1>  ExceptionAddress         = 001FFCF7 (00180000) "C:Program Files (x86)Microsoft Visual Studio 9.0VCbinlink.exe"
1>  NumberParameters         = 00000002
1>  ExceptionInformation[ 0] = 00000000
1>  ExceptionInformation[ 1] = 011BD670
1>CONTEXT:
1>  Eax    = 400DA210  Esp    = 0014EADC
1>  Ebx    = 4000815C  Ebp    = 0014EB04
1>  Ecx    = 011BD670  Esi    = 400DA098
1>  Edx    = 0014EAF4  Edi    = 0018D6C0
1>  Eip    = 001FFCF7  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    = 00000000 

6 Answers

This is a bug in the linker. It may be the same as this problem. Try installing VS2008 Service Pack 1 if you don’t have it as it contains that fix and others.

If this doesn’t help, turning off incremental linking may be a workaround.

Installing Windows SDK 7 for 64 bit platform resolved my problem. I simply didn’t have it when I’ve tried to compile without it. My bad.

I’ve had the same problem. Without setup a new hotfix I’ve found a very easy solution.
To link a new solution I proceed in this way:
1) Compiling the file cpp (CTRL-F7)
2) Generating the solution (F7)

All the times the problem has disappeared

Turning off incremental linking didn’t work for me because I was developing a static library and therefore instead of the Linker properties I had a Librarian.

So I found one more way to fix this:

Properties -> Configuration Properties -> C/C++ -> Optimization -> Whole program optimization

switch to «No«.

It helped in my case.

I had a similar error. After trying many cleans and rebuilds I went for the more nuclear option.

  1. Deleted the entire source tree.
  2. Did a full get from TFS
  3. Restarted the computer
  4. Compiled.

Could work for others, seemed to work for me.

I had a similar error when compiling an unreal-engine4 v4.23 game on Windows 10 with VS 2017 Community Edition. The solution was just to update to the latest version of visual-studio, as the subsequent patches included a fix for this. I am currently at v15.9.18 and it’s compiling without this error.

No need to reboot or install any particular hotfixes, just the standard updates.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Fatal error little nightmares windows 10
  • Fatal error little nightmares 2 на пиратке
  • Fatal error liquidcrystal h no such file or directory
  • Fatal error link 1168
  • Fatal error line 258 direct3ddevice back 4 blood

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии