I’ve installed Visual Studio 2012 Release Preview, and it appears to be fine, but now when I try to use Visual Studio 2010 to compile C++ projects, I get the following error message:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
I’m not 100% sure of this, but it seems to be related to projects that have .rc
(resource) files in them.
I’ve tried repairing Visual Studio 2010 from Add/Remove programs and rebooting, but this has no effect.
I also get the same error if I use Visual Studio 2012 RC to compile the C++ projects when set to use the Visual Studio 2010 toolset. Upgrading to the Visual Studio 2011 toolset fixes the problem (but of course I don’t want to do this for production code).
Update: I’ve uninstalled Visual Studio 2012, rebooted, and the problem still persists! Help!
asked Jun 4, 2012 at 21:08
Orion EdwardsOrion Edwards
120k61 gold badges237 silver badges326 bronze badges
1
This MSDN thread explains how to fix it.
To summarize:
-
Either disable incremental linking, by going to
Project Properties -> Configuration Properties -> Linker (General) -> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
-
or install VS2010 SP1.
Edits (@CraigRinger): Note that installing VS 2010 SP1 will remove the 64-bit compilers. You need to install the VS 2010 SP1 compiler pack to get them back.
This affects Microsoft Windows SDK 7.1 for Windows 7 and .NET 4.0 as well as Visual Studio 2010.
answered Jun 5, 2012 at 1:19
17
If disabling incremental linking doesn’t work for you, and turning off «Embed Manifest» doesn’t work either, then search your path for multiple versions of CVTRES.exe.
By debugging with the /VERBOSE linker option I found the linker was writing that error message when it tried to invoke cvtres and it failed.
It turned out that I had two versions of this utility in my path. One at C:Program Files (x86)Microsoft Visual Studio 10.0VCBINcvtres.exe
and one at C:WindowsMicrosoft.NETFrameworkv4.0.30319cvtres.exe
. After VS2012 install, the VS2010 version of cvtres.exe will no longer work. If that’s the first one in your path, and the linker decides it needs to convert a .res file to COFF object format, the link will fail with LNK1123.
(Really annoying that the error message has nothing to do with the actual problem, but that’s not unusual for a Microsoft product.)
Just delete/rename the older version of the utility, or re-arrange your PATH variable, so that the version that works comes first.
Be aware that for x64 tooling builds you may also have to check C:Program Files (x86)Microsoft Visual Studio 10.0VCbinamd64
where there is another cvtres.exe
.
Martin Ba
36.4k30 gold badges179 silver badges329 bronze badges
answered Jan 3, 2013 at 18:14
Die in SenteDie in Sente
9,4663 gold badges35 silver badges40 bronze badges
4
Check the version of cvtrs.exe
:
dir "C:Program Files (x86)Microsoft Visual Studio 10.0VCbincvtres.exe"
Wrong version:
date
: 03/18/2010
time
: 01:16 PM
size
: 31,048 bytes
name
: cvtres.exe
Correct version:
date
: 02/21/2011
time
: 06:03 PM
size
: 31,056 bytes
name
: cvtres.exe
If you have wrong version you should copy the correct version from:
C:Program Files (x86)Microsoft Visual Studio 11.0VCbincvtres.exe
and replace the one here:
C:Program Files (x86)Microsoft Visual Studio 10.0VCbincvtres.exe
i.e.
copy "C:Program Files (x86)Microsoft Visual Studio 11.0VCbincvtres.exe" "C:Program Files (x86)Microsoft Visual Studio 10.0VCbincvtres.exe"
answered Oct 9, 2013 at 11:04
SidSid
4,6751 gold badge17 silver badges17 bronze badges
3
According to this thread in MSDN forums: VS2012 RC installation breaks VS2010 C++ projects, simply, take cvtres.exe
from VS2010 SP1
C:Program Files (x86)Microsoft Visual Studio 10.0VCbincvtres.exe
or from VS2012
C:Program Files (x86)Microsoft Visual Studio 11.0VCbincvtres.exe
and copy it over the cvtres.exe
in VS2010 RTM installation (the one without SP1)
C:Program Files (x86)Microsoft Visual Studio 10.0VCbincvtres.exe
This way, you will effectively use the corrected version of cvtres.exe
which is 11.0.51106.1.
Repeat the same steps for 64-bit version of the tool in C:Program Files (x86)Microsoft Visual Studio 10.0VCbinamd64cvtres.exe
.
This solution is an alternative to installation of SP1 for VS2010 — in some cases you simply can’t install SP1 (i.e. if you need to support pre-SP1 builds).
answered Mar 7, 2013 at 11:46
mloskotmloskot
36.3k11 gold badges107 silver badges132 bronze badges
1
If you have installed Visual Studio 2012 RC, then it installed .NET 4.5 RC.
Uninstall .NET 4.5 RC, and install the version you need (4.0 for VS 2010). This should clear up any problems you are having.
This solved the same problem. There is no need to uninstall Visual Studio.
rogerdpack
60.5k35 gold badges259 silver badges379 bronze badges
answered Sep 4, 2012 at 22:51
B_Dubb42B_Dubb42
5804 silver badges9 bronze badges
2
For me, setting ‘Generate Manifest’ to ‘No’ fixed it. (Also fixed with /INCREMENTAL:NO)
answered Sep 6, 2012 at 16:47
FractalSpaceFractalSpace
5,4112 gold badges42 silver badges47 bronze badges
If you’re using x64, here’s a resource will help:
This happens because Microsoft .NET 4.5 is incompatible with Visual C++ 10. The workaround is to ensure that you run the .NET version of cvtres.exe rather than the Visual C++ version. I did this by renaming the Visual C++ versions of those files and copying the .NET versions in their place.
1. C:Program Files (x86)Microsoft Visual Studio 10.0VCbincvtres.exe
2. C:Program Files (x86)Microsoft Visual Studio 10.0VCbinamd64cvtres.exe
1. C:windowsMicrosoft.NETFrameworkv4.0.30319cvtres.exe
2. C:windowsMicrosoft.NETFramework64v4.0.30319cvtres.exe
answered Mar 12, 2015 at 13:17
Richard PeckRichard Peck
75.6k9 gold badges92 silver badges145 bronze badges
1
I solved this problem eventually by doing a full uninstall of VS2012 RC, followed by a full uninstall of VS2010, then a reinstall from scratch of VS2010.
It took forever, but I’m now able to compile C++ projects in VS2010 again.
answered Jun 4, 2012 at 23:09
Orion EdwardsOrion Edwards
120k61 gold badges237 silver badges326 bronze badges
The issue was magically resolved for me by removing .NET 4.5, and replacing it with .NET 4.0. I then had to repair Visual Studio 2010 — it being corrupted along the way somehow.
I had previously installed, and then un-installed, Visual Studio 2012 — which may be related to the issue.
answered Oct 17, 2012 at 20:19
CaterpillarCaterpillar
5996 silver badges20 bronze badges
1
I have not installed Visual Studio 2012, but I still got this error in Visual Studio 2010. I got this resolved after installing Visual Studio 2010 SP1.
answered Dec 5, 2012 at 14:38
SajiSaji
1031 silver badge6 bronze badges
I had the same problem with Microsoft Visual Studio 2010 Ultimate and it was solved by the method described in this youtube video
The video suggests to rename the file cvtres.exe in C:Program Files (x86)Microsoft Visual Studio 10.0VCbin (in my Win7X64 matchine)
to cvtres-old.exe
answered May 14, 2016 at 11:21
Sepideh AbadpourSepideh Abadpour
2,40010 gold badges50 silver badges86 bronze badges
0
It didn’t work for me after Enable Incremental Linking -> «No (/INCREMENTAL:NO)», but it works for me after I deleted the rc file.
answered Mar 28, 2014 at 4:58
robin.lorobin.lo
911 silver badge4 bronze badges
+1 to user Short for an answer that worked for me!
I tried to do some debugging of this with msbuild /v:diag
, and I’m seeing that MSBuild is trying to embed a manifest in the executable, with <somename>.dll.embed.manifest.res on the linker command line, where that is a resource file built from <somename>.dll.embed.manifest. But the manifest file is an empty Unicode text file. (That is, a two-byte file with the Unicode 0xFEFF prefix)
So the root problem seems to have something to do with that manifest file not being generated, or it being used when <somename>.dll.intermediate.manifest should have been used.
An alternate solution seems to be to turn off the «Embed Manifest» option under Properties, Manifest Tool, Input and Output.
answered Oct 8, 2012 at 22:53
Die in SenteDie in Sente
9,4663 gold badges35 silver badges40 bronze badges
0
To summarize:
Step1
Project Properties
-> Configuration Properties
-> Linker (General)
-> Enable Incremental Linking -> "No (/INCREMENTAL:NO)"
if step1 not work, do Step2
Project Properties
-> Configuration Properties
-> Manifest Tool (Input and Output)
-> Enable Incremental Linking -> "No"
if step2 not work, do Step3
Copy file one of:
- C:Program Files (x86)Microsoft Visual Studio
11.0VCbincvtres.exe - C:Program Files (x86)Microsoft Visual Studio
12.0VCbincvtres.exe -
C:Program Files (x86)Microsoft Visual Studio
13.0VCbincvtres.exeThen, replace to C:Program Files (x86)Microsoft Visual Studio
10.0VCbincvtres.exe
With me, do 3 step it work
answered Sep 30, 2015 at 2:23
Hung PhamHung Pham
1971 silver badge3 bronze badges
0
As of January 2014, for some reasons I got installed .NET Framework 4.5.1, I don’t know if due to a third party software installation or to an automatic update.
On January 29th, I got installed one component and I started receiving the
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
message. At that time, I solved by avoiding the incremental link.
On Jan. 31st, I got installed another component of .NET Framework 4.5.1 and the incremental link trick did not work anymore. I then installed the Visual Studio 2010 SP1, but afterwards the problem became:
Error 6 error LNK1104: cannot open file 'msvcrtd.lib'.
I think the SP1 messed up my Visual Studio 2010 installation.
So I uninstalled .NET Framework 4.5.1, installed .NET Framework 4.0 and uninstalled and then reinstalled Visual Studio 2010. That worked for me.
answered Feb 1, 2014 at 19:54
VitalityVitality
20.2k4 gold badges103 silver badges142 bronze badges
Even inspite of installing Service pack you are getting the error then try removing/renaming the cvtres.exe in the C:Program Files (x86)Microsoft Visual Studio 10.0VCbin folder. This has worked for me.
answered Nov 4, 2014 at 8:29
nerdnerd
3391 gold badge5 silver badges15 bronze badges
2
I set Enable Incremental Linking to «No (/INCREMENTAL:NO)» and it doesn’t work for me.
Next I’ve changed:
Project Properties
-> Configuration Properties
-> General
-> Platform Toolset -> "Visual Studio 2012 (v110)"
and it works for me
answered Oct 11, 2012 at 6:06
sma6871sma6871
3,1483 gold badges37 silver badges52 bronze badges
2
Reinstalling CMake worked for me. The new copy of CMake figured out that it should use Visual Studio 11 instead of 10.
answered Mar 26, 2013 at 20:38
maniminomanimino
1,2351 gold badge11 silver badges10 bronze badges
I was using the Windows SDK for core Win32 programming and had .NET 4.5 installed for «unknown» reasons. I have uninstalled that and installed 4.0 like previous answers and yeah, it worked for me too.
Just am flabbergasted that I had to use the useless .NET framework for building Win32 apps using the SDK.
answered Jun 19, 2013 at 11:09
I solved this by doing the following:
- In a command prompt, type msconfig and press enter.
- Click services tab.
- Look for «Application Experience» and put tick mark (that is, select this to enable).
- Click OK. And restart if necessary.
Thus the problem will go forever. Do build randomly and debug your C++ projects without any disturbance.
answered Jun 12, 2013 at 10:57
App WorkApp Work
21.8k5 gold badges25 silver badges38 bronze badges
2
For those of you looking for a solution for this problem with the OpenGL SuperBible 6th source code samples, the solution is building in Release instead of Debug. All projects have disabled the incremental linking option in the Release version.
answered Aug 8, 2013 at 23:29
GalloGallo
516 bronze badges
My problem was that I’ve had two paths on my PC that contained the same libraries. Both paths were added to the Additional Library Directories in Configuration Properties -> Linker -> General. Removing one of the paths solved the problem.
answered Oct 17, 2013 at 11:20
mihaimihai
4,4883 gold badges29 silver badges41 bronze badges
I had the same problem after updating of .NET:
I uninstalled the .NET framework first,
downloaded visual studio from visualstudio.com and selected «repair».
NET framework were installed automatically with visual studio -> and now it works fine!
answered Jul 2, 2015 at 20:34
I tried a few times and finally solved the problem by uninstalling several times the VS2010. I think I hadn’t uninstalled all the files and that’s why it didn’t work for the first time.
In the installation of VS2012, it is said that if you have VS2010 SP1 you can’t work on the same project in both programs. It is recommended to have only one program.
Thanks!
hackjutsu
8,03412 gold badges45 silver badges84 bronze badges
answered Jun 13, 2012 at 9:45
0
- Remove From My Forums
-
Question
-
I wish it would tell me what’s corrupt.
any tips?
Answers
-
-
Edited by
Elegentin Xie
Monday, July 30, 2012 6:15 AM -
Marked as answer by
Elegentin Xie
Thursday, August 2, 2012 4:44 AM
-
Edited by
All replies
-
-
Edited by
Elegentin Xie
Monday, July 30, 2012 6:15 AM -
Marked as answer by
Elegentin Xie
Thursday, August 2, 2012 4:44 AM
-
Edited by
-
Same problem as above with the exception that I am install vs express 2010 and cant get past building anything.
Background:
I had downloaded vs 2012 express but wasnt successful cause i am using an old windows vista box (backup box). So i uninstalled 2012 express and installed vs 2010.
Install was successful. Compilation fails at the end of building the library with the error:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
So far, I have uninstalled vs 2012 express, re-installed 2010 express and still the same error.
Anyone have any ideas as to what to try next ??
Sunil
-
Have you tried SP1? You can create a new thread…
Reply, then visible.
-
Install was successful. Compilation fails at the end of building the library
Are we to infer from this that you are trying to create a
library rather than an exe? If so, what kind? DLL? Static?>LINK : fatal error LNK1123: failure during conversion to COFF:
file invalid or corruptThe typical cause is that you are passing a file to the linker
which isn’t a valid obj file, static library, or import lib.If you are passing arguments to link which are source code,
or object code created with an older or non-compatible
compiler, you will get this error. Note that object code
files are rarely portable across compilers or even some
versions of the same compiler.Without details of what you are trying to do, and how,
there is little we can suggest. Note that it is not
likely an installation problem with VC++, but probably
an issue with what you have in the project you are
building.— Wayne
-
Thanks for taking the time for the answers !
The problem is fixed now.
Wayne: good explanation … I checked and i didnt have any obj files from my other system. I usually do a clean and obj files are in a different directory. Good point though.
fyi: I was building a static library. It seems like there were a couple of issues.
I removed vs 2012 express because of incompatibility with vista, and re-installed vs 2010 express. The problem still persisted.
I removed all sql server 2012. Using windows, this was a lot of packages/programs.
I reinstalled sql server 2012. Installed sql server 2010 then reinstalled vs 2010 express, and voila ! next build worked.
Seems like there is a certain dependency and incompatibility between the two sql server versions and vs 2010 express ??
I think the problem could have been avoided if vs 2012 express wouldnt have installed on vista in the first place, rather than failing at the end and not removing all installed components.
Thanks again for all the answers,
Sunil
-
Kaliber64,
Found I had multiple versions of CVTRES.EXE on my system.
VS2012 made my old 2010 cvtes.exe file obsolete in C:Program Files (x86)Microsoft Visual Studio 10.0VCbin
I renamed the file with V2010 in front and .old extension. The version in C:WindowsMicrosoft.NETFrameworkv4.0.30319 from 9/19/2012 was left in place and that fixed the error.
I hope this helps.
-
Proposed as answer by
ralf-Mumpi
Saturday, February 22, 2014 9:22 PM -
Unproposed as answer by
ralf-Mumpi
Saturday, February 22, 2014 9:23 PM -
Proposed as answer by
ramacpr
Wednesday, November 30, 2016 5:16 AM
-
Proposed as answer by
-
VS 2012 installation has changed all content from «C:Program Files (x86)Microsoft Visual Studio 10.0VCbin» to its RTMRel version (10.0.30319.1) while VS 2010 SP1 (10.0.40219.1) was installed (including cvtres.exe mentioned above).
I changed back its content and problem has gone.
-
Thank you! this worked well.
-
This worked for me. Thanks a lot.
-
THANK YOU!
This was the quickest and easiest fix ever!
Содержание
- Ошибка средств компоновщика LNK1123
- Устранение проблемы
- Ошибка средств компоновщика LNK1123
- Устранение проблемы
- Fatal error lnk1123 failure during conversion to coff file invalid or corrupt link
- Answered by:
- Question
- Answers
- All replies
- Linker Tools Error LNK1123
- To fix the problem
- Fatal error lnk1123 failure during conversion to coff file invalid or corrupt link
- Answered by:
- Question
- Answers
- All replies
Ошибка средств компоновщика LNK1123
сбой при преобразовании в COFF: файл недопустим или поврежден
Входные файлы должны иметь формат COFF. Если входной файл не имеет формат COFF, компоновщик автоматически пытается преобразовать 32-разрядные объекты OMF в формат COFF или запускает программу CVTRES.EXE для преобразования файлов ресурсов. Это сообщение означает, что компоновщик не может преобразовать файл. Эта ошибка также может происходить при использовании несовместимой версии CVTRES.EXE из другой установки Visual Studio, пакета средств разработки программного обеспечения для Windows или платформы .NET Framework.
Если используется более ранняя версия Visual Studio, автоматическое преобразование может не поддерживаться.
Устранение проблемы
Примените все обновления и пакеты обновления для используемой версии Visual Studio. Это особенно важно для Visual Studio 2010.
Попробуйте выполнить сборку с отключенной инкрементной компоновкой. в строке меню выберите Project, свойства. В диалоговом окне страницы свойств разверните узел Свойства конфигурации, Компоновщик. Измените значение параметра Включить инкрементную компоновку в нет.
Проверьте, соответствует ли версия CVTRES.EXE, указанная первой в переменной среды PATH, версии средств сборки или используемого проектом набора инструментов платформы,.
Попробуйте отключить параметр «Внедренный манифест». в строке меню выберите Project, свойства. В диалоговом окне страницы свойств разверните узел Свойства конфигурации, инструмент манифеста, Ввод и вывод. Измените значение параметра внедрить манифест на нет.
Убедитесь в том, что тип файла является допустимым. Например, убедитесь в том, что объект OMF 32-разрядный, а не 16-разрядный. Дополнительные сведения см. в разделе . OBJ-файлы в качестве входных и PE-файлов компоновщика.
Убедитесь в том, что файл не поврежден. Заново выполните сборку, если нужно.
Источник
Ошибка средств компоновщика LNK1123
сбой при преобразовании в COFF: файл недопустим или поврежден
Входные файлы должны иметь формат COFF. Если входной файл не имеет формат COFF, компоновщик автоматически пытается преобразовать 32-разрядные объекты OMF в формат COFF или запускает программу CVTRES.EXE для преобразования файлов ресурсов. Это сообщение означает, что компоновщик не может преобразовать файл. Эта ошибка также может происходить при использовании несовместимой версии CVTRES.EXE из другой установки Visual Studio, пакета средств разработки программного обеспечения для Windows или платформы .NET Framework.
Если используется более ранняя версия Visual Studio, автоматическое преобразование может не поддерживаться.
Устранение проблемы
Примените все обновления и пакеты обновления для используемой версии Visual Studio. Это особенно важно для Visual Studio 2010.
Попробуйте выполнить сборку с отключенной инкрементной компоновкой. в строке меню выберите Project, свойства. В диалоговом окне страницы свойств разверните узел Свойства конфигурации, Компоновщик. Измените значение параметра Включить инкрементную компоновку в нет.
Проверьте, соответствует ли версия CVTRES.EXE, указанная первой в переменной среды PATH, версии средств сборки или используемого проектом набора инструментов платформы,.
Попробуйте отключить параметр «Внедренный манифест». в строке меню выберите Project, свойства. В диалоговом окне страницы свойств разверните узел Свойства конфигурации, инструмент манифеста, Ввод и вывод. Измените значение параметра внедрить манифест на нет.
Убедитесь в том, что тип файла является допустимым. Например, убедитесь в том, что объект OMF 32-разрядный, а не 16-разрядный. Дополнительные сведения см. в разделе . OBJ-файлы в качестве входных и PE-файлов компоновщика.
Убедитесь в том, что файл не поврежден. Заново выполните сборку, если нужно.
Источник
Fatal error lnk1123 failure during conversion to coff file invalid or corrupt link
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
I wish it would tell me what’s corrupt.
Answers
Welcome to the MSDN forum.
I really have stuck in your issue some days ago, and here I give you some suggestions about it.
- Try to re-install Visual Studio 2010 SP1, it will fix it.
- If you do not want to do it, try this way: (However, it will occur a warning when complier.) Set the Enable Incremental Linking to /No(/INCREMENTAL:NO) in property page->configuration properties->Linker->General.
My issue has gone now; I hope my suggestions will help you.
Elegentin Xie [MSFT]
MSDN Community Support | Feedback to us
Welcome to the MSDN forum.
I really have stuck in your issue some days ago, and here I give you some suggestions about it.
- Try to re-install Visual Studio 2010 SP1, it will fix it.
- If you do not want to do it, try this way: (However, it will occur a warning when complier.) Set the Enable Incremental Linking to /No(/INCREMENTAL:NO) in property page->configuration properties->Linker->General.
My issue has gone now; I hope my suggestions will help you.
Elegentin Xie [MSFT]
MSDN Community Support | Feedback to us
Same problem as above with the exception that I am install vs express 2010 and cant get past building anything.
I had downloaded vs 2012 express but wasnt successful cause i am using an old windows vista box (backup box). So i uninstalled 2012 express and installed vs 2010.
Install was successful. Compilation fails at the end of building the library with the error:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
So far, I have uninstalled vs 2012 express, re-installed 2010 express and still the same error.
Anyone have any ideas as to what to try next ??
Reply, then visible.
Install was successful. Compilation fails at the end of building the library
Are we to infer from this that you are trying to create a
library rather than an exe? If so, what kind? DLL? Static?
>LINK : fatal error LNK1123: failure during conversion to COFF:
file invalid or corrupt
The typical cause is that you are passing a file to the linker
which isn’t a valid obj file, static library, or import lib.
If you are passing arguments to link which are source code,
or object code created with an older or non-compatible
compiler, you will get this error. Note that object code
files are rarely portable across compilers or even some
versions of the same compiler.
Without details of what you are trying to do, and how,
there is little we can suggest. Note that it is not
likely an installation problem with VC++, but probably
an issue with what you have in the project you are
building.
Источник
failure during conversion to COFF: file invalid or corrupt
Input files must have the Common Object File Format (COFF) format. If an input file is not COFF, the linker automatically tries to convert 32-bit OMF objects to COFF, or runs CVTRES.EXE to convert resource files. This message indicates that the linker could not convert the file. This can also occur when using an incompatible version of CVTRES.EXE from another installation of Visual Studio, the Windows Development Kit, or .NET Framework.
If you are running an earlier version of Visual Studio, automatic conversion may not be supported.
To fix the problem
Apply all service packs and updates for your version of Visual Studio. This is particularly important for Visual Studio 2010.
Try building with incremental linking disabled. On the menu bar, choose Project, Properties. In the Property Pages dialog box, expand Configuration Properties, Linker. Change the value of Enable Incremental Linking to No.
Verify that the version of CVTRES.EXE found first in your PATH environment variable matches the version of the build tools, or the version of the Platform Toolset, used by your project.
Try turning off the Embed Manifest option. On the menu bar, choose Project, Properties. In the Property Pages dialog box, expand Configuration Properties, Manifest Tool, Input and Output. Change the value of Embed Manifest to No.
Make sure that the file type is valid. For example, make sure that an OMF object is 32-bit and not 16-bit. For more information, see .Obj Files as Linker Input and PE Format.
Make sure that the file is not corrupt. Rebuild it, if necessary.
Источник
Fatal error lnk1123 failure during conversion to coff file invalid or corrupt link
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Answered by:
Question
After installing VS2012 RC I can’t compile my VC projects in VS2010.
I receive «fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt».
Answers
Do you have VS2010 SP1 installed? In the Compatibility page it states that:
If Visual Studio 2012 RC and Visual Studio 2010 with SP1 are installed on the same computer, you can open the project in both of those versions of Visual Studio.
I extremely need working Visual Studio to complete my project by Monday. Uninstalling VS 2012 didn’t fix the problem, as soon as reinstalling VS 2010.
Will try to uninstall everything — Studio, SDK — but I’m afraid it will not help.
I’ve managed to get it work again by re-installing visual studio
Welcome to the MSDN forum.
Sorry for having you run into this issue, actually, installing beta software on a production system is a high risk maneuver.
Now please try to fully uninstall VS2012 through control panel then uninstall VS2010 with this tool
(PS: Since you have installed VS2008 on your OS, first just try default command )
Then re-install VS2010, tell me if there is any error when installing.
Barry Wang [MSFT]
MSDN Community Support | Feedback to us
I think I’ve found a solution for some C++ projects in vs2010. If you are using ‘incremental linking’ you will have this «fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt». In my case I’ve swiched it to «No», and now project compiles and run without any problem.
If you want to try go to: Project Properties -> Configuration Properties -> Linker (General) -> Enable Incremental Linking -> «No (/INCREMENTAL:NO)»
Do you have VS2010 SP1 installed? In the Compatibility page it states that:
If Visual Studio 2012 RC and Visual Studio 2010 with SP1 are installed on the same computer, you can open the project in both of those versions of Visual Studio.
Thank you Fluesopp. After installing SP1 projects compiles with and without incremental linking, so it probably replaced/repaired linker.
About that projects compatibility, it doesn’t seem to work for me, maybe beacause of all that reinstalling.
We’re having the same problem, while having no problems during the beta. I tried to turn off incremental linking, but it doesn’t appear to make a difference. The problem only occurs in project that have resource files (.rc), and fails only on those during linking. The .res files generated do not seem to differ from systems without VS2012 installed.
Due to our integrated build system based on VS2010, it’s not trivial to update to SP1. Does anyone have any hints to where I might start looking for another solution, or what exactly is causing the problem in the first place? For as far as I can see, the environment variables seem correct, and we haven’t been able to find any updated DLLs that seem suspicious. I’d hate to have to go through a complete uninstall of all my visual studios, and we’d really like to be able to use VS2012 as an IDE.
Источник
I get this error while executing python script/bootstrap.py
: Releaseobjlibgit2git2.res : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesgit-utilsbuildlibgit2.vcxproj]
I don’t know what to do with this error. Does someone recognize the problem?
Thanks
Here is the full log, the error is at the bottom of it:
C:OWNSCM-StoreGitHubatomatom-shell>C:Python27python.exe C:OWNSCM-StoreGitHubatomatom-shellscriptbootstrap.py
> atom-shell@0.12.4 preinstall C:OWNSCM-StoreGitHubatomatom-shell
> node -e 'process.exit(0)'
npm http GET https://registry.npmjs.org/atom-package-manager
npm http 304 https://registry.npmjs.org/atom-package-manager
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/underscore-plus
npm http GET https://registry.npmjs.org/temp
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/wrench
npm http GET https://registry.npmjs.org/season
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/node-gyp
npm http GET https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/runas
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/fs-plus
npm http GET https://registry.npmjs.org/keytar
npm http GET https://registry.npmjs.org/read
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/first-mate
npm http GET https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/git-utils
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/mv
npm http GET https://registry.npmjs.org/open
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/temp
npm http 304 https://registry.npmjs.org/underscore-plus
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/colors
npm http 304 https://registry.npmjs.org/wrench
npm http 304 https://registry.npmjs.org/season
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/runas
npm http 304 https://registry.npmjs.org/node-gyp
npm http 304 https://registry.npmjs.org/npm
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/read
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/fs-plus
npm http 304 https://registry.npmjs.org/keytar
npm http 304 https://registry.npmjs.org/tar
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/first-mate
npm http 304 https://registry.npmjs.org/git-utils
npm http 304 https://registry.npmjs.org/mv
npm http 304 https://registry.npmjs.org/open
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/ncp
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/mute-stream
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/ncp
npm http 304 https://registry.npmjs.org/mute-stream
> runas@0.3.0 install C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunas
> node-gyp rebuild
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunas>node "C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin\....node_modulesnode-gypbinnode-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
main.cc
runas_win.cc
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasnode_modulesnannan.h(999): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasbuildrunas.vcxproj]
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasnode_modulesnannan.h(1016): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasbuildrunas.vcxproj]
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasnode_modulesnannan.h(1047): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasbuildrunas.vcxproj]
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasnode_modulesnannan.h(1076): warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data [C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasbuildrunas.vcxproj]
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasnode_modulesnannan.h(865): warning C4244: 'initializing' : conversion from '__int64' to 'int', possible loss of data [C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasbuildrunas.vcxproj]
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasnode_modulesnannan.h(1058) : see reference to function template instantiation 'size_t _nan_base64_decode<char>(char *,size_t,const TypeName *,const size_t)' being compiled
with
[
TypeName=char
]
Creating library C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasbuildReleaserunas.lib and object C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasbuildReleaserunas.exp
Generating code
Finished generating code
runas.vcxproj -> C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesrunasbuildRelease\runas.node
npm
> keytar@1.0.0 install C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_moduleskeytar
> node-gyp rebuild
http GET https://registry.npmjs.org/block-stream
npm http GET https://registry.npmjs.org/inherits
npm http
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_moduleskeytar>node "C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin\....node_modulesnode-gypbinnode-gyp.js" rebuild
GET https://registry.npmjs.org/fstream
npm http 304 https://registry.npmjs.org/inherits
npm http 304 https://registry.npmjs.org/block-stream
npm http 304 https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/cookie-jar
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/aws-sign
npm http 304 https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/cookie-jar
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/oniguruma
npm http GET https://registry.npmjs.org/emissary
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/aws-sign
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/oniguruma
npm http 304 https://registry.npmjs.org/emissary
npm http GET https://registry.npmjs.org/assert-plus
npm http GET https://registry.npmjs.org/asn1
npm http GET https://registry.npmjs.org/ctype
npm http GET https://registry.npmjs.org/mixto
npm http GET https://registry.npmjs.org/property-accessors
npm http 304 https://registry.npmjs.org/asn1
npm http 304 https://registry.npmjs.org/assert-plus
npm http 304 https://registry.npmjs.org/ctype
npm http 304 https://registry.npmjs.org/mixto
npm http 304 https://registry.npmjs.org/property-accessors
npm http GET https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/sntp
npm http GET https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/hoek
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/minimatch
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/npmlog
npm http GET https://registry.npmjs.org/which
npm http GET https://registry.npmjs.org/osenv
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/which
npm http GET https://registry.npmjs.org/delayed-stream
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/npmlog
npm http 304 https://registry.npmjs.org/minimatch
npm http 304 https://registry.npmjs.org/osenv
npm http 304 https://registry.npmjs.org/delayed-stream
npm http GET https://registry.npmjs.org/ansi
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/sigmund
npm http GET https://registry.npmjs.org/minimist
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/ansi
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/sigmund
npm http 304 https://registry.npmjs.org/minimist
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
main.cc
keytar_win.cc
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_moduleskeytarnode_modulesnannan.h(934): warning C4244: 'initializing' : conversion from '__int64' to 'int', possible loss of data [C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_moduleskeytarbuildkeytar.vcxproj]
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_moduleskeytarnode_modulesnannan.h(1127) : see reference to function template instantiation 'size_t _nan_base64_decode<uint16_t>(char *,size_t,const TypeName *,const size_t)' being compiled
with
[
TypeName=uint16_t
]
Creating library C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_moduleskeytarbuildReleasekeytar.lib and object C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_moduleskeytarbuildReleasekeytar.exp
Generating code
Finished generating code
keytar.vcxproj -> C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_moduleskeytarbuildRelease\keytar.node
> oniguruma@1.0.6 install C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesfirst-matenode_modulesoniguruma
> node-gyp rebuild
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesfirst-matenode_modulesoniguruma>node "C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin\....node_modulesnode-gypbinnode-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
regcomp.c
regenc.c
regerror.c
regexec.c
regext.c
reggnu.c
regparse.c
regposerr.c
regposix.c
regsyntax.c
regtrav.c
regversion.c
st.c
ascii.c
big5.c
cp1251.c
euc_jp.c
euc_kr.c
euc_tw.c
gb18030.c
iso8859_1.c
iso8859_2.c
iso8859_3.c
iso8859_4.c
iso8859_5.c
iso8859_6.c
iso8859_7.c
iso8859_8.c
iso8859_9.c
iso8859_10.c
iso8859_11.c
iso8859_13.c
iso8859_14.c
iso8859_15.c
iso8859_16.c
koi8.c
koi8_r.c
mktable.c
sjis.c
unicode.c
utf16_be.c
utf16_le.c
utf32_be.c
utf32_le.c
utf8.c
oniguruma.vcxproj -> C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesfirst-matenode_modulesonigurumabuildRelease\oniguruma.lib
onig-result.cc
onig-reg-exp.cc
onig-scanner.cc
unicode-utils-win.cc
Creating library C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesfirst-matenode_modulesonigurumabuildReleaseonig_scanner.lib and object C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesfirst-matenode_modulesonigurumabuildReleaseonig_scanner.exp
Generating code
Finished generating code
onig_scanner.vcxproj -> C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesfirst-matenode_modulesonigurumabuildRelease\onig_scanner.node
npm
> git-utils@1.3.0 install C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesgit-utils
> node-gyp rebuild
http GET https://registry.npmjs.org/xmlbuilder
npm http GET https://registry.npmjs.org/xmldom
npm http 304 https://registry.npmjs.org/xmlbuilder
npm http 304 https://registry.npmjs.org/xmldom
npm WARN package.json github-url-from-git@1.1.1 No repository field.
npm http GET https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/nan
C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesgit-utils>node "C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin\....node_modulesnode-gypbinnode-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
attr.c
attr_file.c
blob.c
branch.c
buf_text.c
buffer.c
cache.c
checkout.c
clone.c
commit.c
commit_list.c
compress.c
config.c
config_cache.c
config_file.c
crlf.c
date.c
delta-apply.c
delta.c
diff.c
diff_driver.c
diff_file.c
diff_patch.c
diff_print.c
diff_tform.c
diff_xdiff.c
errors.c
fetch.c
fetchhead.c
filebuf.c
fileops.c
filter.c
fnmatch.c
global.c
graph.c
hash.c
hashsig.c
ident.c
ignore.c
index.c
indexer.c
iterator.c
merge.c
merge_file.c
message.c
mwindow.c
netops.c
notes.c
object.c
object_api.c
odb.c
odb_loose.c
odb_pack.c
oid.c
pack-objects.c
pack.c
path.c
pathspec.c
pool.c
posix.c
pqueue.c
push.c
refdb.c
refdb_fs.c
reflog.c
refs.c
refspec.c
remote.c
repository.c
reset.c
revparse.c
revwalk.c
sha1_lookup.c
signature.c
sortedcache.c
stash.c
status.c
strmap.c
submodule.c
tag.c
thread-utils.c
trace.c
transport.c
tree-cache.c
tree.c
tsort.c
util.c
vector.c
cred.c
cred_helpers.c
git.c
http.c
local.c
smart.c
smart_pkt.c
smart_protocol.c
ssh.c
winhttp.c
xdiffi.c
xemit.c
xhistogram.c
xmerge.c
xpatience.c
xprepare.c
xutils.c
hash_generic.c
dir.c
error.c
findfile.c
map.c
posix_w32.c
precompiled.c
pthread.c
utf-conv.c
regex.c
Releaseobjlibgit2git2.res : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt [C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesgit-utilsbuildlibgit2.vcxproj]
adler32.c
crc32.c
deflate.c
inffast.c
inflate.c
inftrees.c
trees.c
zutil.c
zlib.vcxproj -> C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesgit-utilsbuildRelease\zlib.lib
http_parser.c
http_parser.vcxproj -> C:OWNSCM-StoreGitHubatomatom-shellnode_modulesatom-package-managernode_modulesgit-utilsbuildRelease\http_parser.lib
gypnpm ERR! git-utils@1.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the git-utils@1.3.0 install script.
npm ERR! This is most likely a problem with the git-utils package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls git-utils
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd C:OWNSCM-StoreGitHubatomatom-shell
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm
Traceback (most recent call last):
File "C:OWNSCM-StoreGitHubatomatom-shellscriptbootstrap.py", line 98, in <module>
sys.exit(main())
File "C:OWNSCM-StoreGitHubatomatom-shellscriptbootstrap.py", line 22, in main
update_node_modules('.')
File "C:OWNSCM-StoreGitHubatomatom-shellscriptbootstrap.py", line 59, in update_node_modules
execute([NPM, 'install'])
File "C:OWNSCM-StoreGitHubatomatom-shellscriptlibutil.py", line 118, in execute
raise e
subprocess.CalledProcessError: Command '['npm.cmd', 'install']' returned non-zero exit status 1
C:OWNSCM-StoreGitHubatomatom-shell>