Click here to Skip to main content
15,311,151 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VC ++ 6.0 project moved to VS2010, after the project upgrade, there are hundreds of errors are the system file header error as shown below:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(E:\GWUploadService\.\Debug\GWUploadService.exe) And the Linker's OutputFile property value (D: \ PACS \ GWUploadService.exe) does not match. This may cause the project to be generated incorrectly. To correct this problem, make sure that the values for the $ (OutDir), $ (TargetName), and $ (TargetExt) properties match the value specified in% (Link.OutputFile).
1>LINK : fatal error LNK1123: Failed to transition to COFF: File is invalid or corrupt

What I have tried:

I checked the relevant information on the Internet, but still did not solve, hoping to give a good answer, very grateful.
Posted
Updated 2-Aug-17 22:49pm
v2

Unfortunately I do not read Chinese so cannot answer. However, you can find an explanation of compiler errors at C-C++ Build Errors[^].
   
Comments
DingTingTing 3-Aug-17 4:55am
   
Thank you very much for your answer
[EDIT]
This solution was written as reply to the initial version of the question.
But the question has been edited showing now a completely different error messages.
[/EDIT]

This can't be answered without having the complete source code. While many errors are usually triggered by previous ones, it can be expected that there are still multiple lines generating errors.

To fix the errors, start at the very first. Because they occur in system header files, you have to find your source file that finally includes the system header file throwing the error.

But there is a hint:
e:\vsinstall\vc\atlmfc\include\afxv_w32.h(16): fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
Some of your source files (*.cpp or *.h) seems to include windows.h.

Find that file and remove the include. When using pre-compiled headers, check your stdafx.h file.
   
v2
Comments
DingTingTing 3-Aug-17 4:54am
   
Thank you very much for the answer, I would like to ask if the following mistakes how to solve?
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(E:\GWUploadService\.\Debug\GWUploadService.exe) And the Linker's OutputFile property value (D: \ PACS \ GWUploadService.exe) does not match. This may cause the project to be generated incorrectly. To correct this problem, make sure that the values for the $ (OutDir), $ (TargetName), and $ (TargetExt) properties match the value specified in% (Link.OutputFile).
1>LINK : fatal error LNK1123: Failed to transition to COFF: File is invalid or corrupt
Jochen Arndt 3-Aug-17 5:00am
   
I have just added a not to my solution because there is now no relation to the actual question.

Please don't edit questions in such a way. If my solution solves the previous errors, you can accept my solution and ask a new question.

The now posted messages are quite clear. Just do what they suggest. Do also a full rebuild - or better - delete any output files generated by the VC6.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900