12-09-2015 10:29 AM
I’m trying to create a DLL from a Simulink model for an NIVeriStand target.
There are NIVeriStand specific ‘tlc’ and ‘tmf’ files , supplied.
The build appears to work fine but on closer inspection there is a Linker error
Here’s the tail end of the diagnostic file created :
……
### Compiling SOF_system_2b_R2914b.rc rc SOF_system_2b_R2914b.rc Microsoft (R) Windows (R) Resource Compiler Version 6.1.7600.16385 Copyright (C) Microsoft Corporation. All rights reserved. ### Linking ... D:\PROGRA~1\MATLAB\R2014b\sys\perl\win32\bin\perl D:\PROGRA~1\MATLAB\R2014b\rtw\c\tools\mkvc_lnk.pl SOF_system_2b_R2914b.lnk SOF_system_2b_R2914b.obj NIVeriStand_main.obj SOF_system_2b_R2914b_data.obj rtGetInf.obj rtGetNaN.obj rt_logging.obj rt_nonfinite.obj rt_sim.obj SOF_system_2b_R2914b.res link /RELEASE /INCREMENTAL:NO /NOLOGO -entry:_DllMainCRTStartup@12 -dll kernel32.lib advapi32.lib wsock32.lib @SOF_system_2b_R2914b.lnk /dll -out:SOF_system_2b_R2914b.dll Creating library SOF_system_2b_R2914b.lib and object SOF_system_2b_R2914b.exp LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt *** Created DLL C:\Users\evans_mv\NI Stand Data\R2014b\SOF_system_2b_R2914b_niVeriStand_rtw\SOF_system_2b_R2914b.dll C:\Users\evans_mv\NI Stand Data\R2014b\SOF_system_2b_R2914b_niVeriStand_rtw>exit /B 0 ### Successful completion of Real-Time Workshop build procedure for model: SOF_system_2b_R2914b
It claims to have created a ‘dll’ , but none was created.
I’m using R2014b ( and NI VeriStand 2014). (Windows 7)
Have you seen this kind of this before or do you know of anyone who might have ?
Many thanks
Mal
12-09-2015 11:35 AM
Hello Mal,
Are you building using MSVC++ 2010? If so, this is a known issue as reported by Microsoft in the link below. The solution is to update your Visual Studio 2010 installation to SP1.
LNK1123 error when bulding VC++ 2010 project after installing Visual Studio 2012 or .NET Framework 4.5
https://support.microsoft.com/en-us/kb/2757355
12-18-2015 06:16 AM
Hi Nestor
Thanks for the advice, all fine now , Bon Noel !
mal
05-01-2018 07:23 AM
Hi Mal,
I'm having the same issues, I was wondering what you did to make it work?
I have tried installing .NET Framework 5.2 as per the Microsoft article with no luck.
Thanks,
Hans
08-21-2020 02:22 AM
This setup of Signals and Parameters solved this issue for me after checking I have the right SDK.