MATLAB Answers

How can I eliminate the following error. LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

18 views (last 30 days)
Pius Zaleski
Pius Zaleski on 20 Aug 2020
Commented: Pius Zaleski on 26 Aug 2020
Using R2015b 32-bit MATLAB Compiler SDK to create Generic COM Component.
I receive the following error at the end of the attached log file.
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
The C compiler being used is identified in the log file as follows.
... Looking for compiler 'Microsoft Windows SDK 7.1 (C++)' ...
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.1' InstallationFolder ...Yes ('C:\Program Files\Microsoft SDKs\Windows\v7.1\').
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VC7' 10.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 10.0' ...Yes.
Found installed compiler 'Microsoft Windows SDK 7.1 (C++)'.
The latest Microsoft .NET Framework is Framework 4 Multi-pack (I saw that .NET framework 4.5 had caused this kind of error for someone else.).

  0 Comments

Sign in to comment.

Answers (1)

Kiran Felix Robert
Kiran Felix Robert on 26 Aug 2020
Hi Pius,
This is an issue due to VS 2012, VS 2010 and Microsoft. This issue can be resolved either by upgrading VS 2010 to VS 2010 SP1 or by disabling the incremental linking in Visual Studio as follows
Project Properties > Configuration Properties > Linker > Enable Incremental Linking > No
Kiran Felix Robert

Products


Release

R2015b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!