Customer is running Visual COBOL 2.1, Visual Studio 2010 SP1 but also previously had Visual Studio 2012 installed on same computer.
Customer has a native COBOL link library project consisting of a single resource file (myfile.rc).
When the project is built the following error occurs:
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
How can this be fixed?
This problem does arise from having both Visual Studio 2010 and Visual Studio 2012 installed on the same system.
Microsoft states that the problem can be resolved by installing Visual Studio 2010 SP1. Although this will fix the problem when using Microsoft languages it will not solve the problem when using Visual COBOL 2.1.
This is because Visual COBOL provides a preSP1 version of the CVTRES.EXE utility in its bin folder and this is the one that is picked up when compiling resources in a Visual COBOL project.
As a workaround you can copy the SP1 version of the CVTRES.EXE utility from the \Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin folder to the \Program Files (x86)\Micro Focus\Visual COBOL\bin folder.
We will be replacing the default version of this file with a later version in an upcoming product update.