Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Fail to compile a S-Function to Simulink Real-Time (xPC Target) with fatal error LNK1107

39 views
Skip to first unread message

Yongxiang Fan

unread,
Jun 29, 2015, 1:34:11 AM6/29/15
to
Hi,

I tried to compile a PhaseSpace data acquisition C++ code to my target PC. The original code was successfully compiled and executed in the windows PC. However, it was failed when I attempted to compiled it to the Simulink Real-Time.

The error message was shown as follow,

### Linking ...
C:\PROGRA~1\MATLAB\R2014b\sys\perl\win32\bin\perl C:\PROGRA~1\MATLAB\R2014b\rtw\c\tools\mkvc_lnk.pl td_dual_ucb_004_1.lnk td_dual_ucb_004_1.obj rt_logging.obj rt_logging_mmi.obj rt_matrx.obj rt_printf.obj rtw_modelmap_utils.obj td_dual_ucb_004_1_capi.obj td_dual_ucb_004_1_data.obj xpc_datatype_ground.obj xpctarget.obj xpcethercatpdorx.obj xpcethercatpdotx.obj dinipci6528.obj donipci6528.obj ptrack_sfunc.obj adnipcim.obj xpcionim.obj
link /NOLOGO /DLL /SUBSYSTEM:CONSOLE /DEF:xpcvcdll.def /Include:_malloc C:\PROGRA~1\MATLAB\R2014b\toolbox\rtw\targets\xpc\target\build\lib\libatlas.a C:\PROGRA~1\MATLAB\R2014b\toolbox\rtw\targets\xpc\target\build\lib\libcblas.a C:\PROGRA~1\MATLAB\R2014b\toolbox\rtw\targets\xpc\target\build\xpcblocks\lib\AtEcat_xpc_vc.lib xpcruntime.lib C:\Users\Hsien-Chung\Documents\FANUCIntern\LRMate200_Experimentor_hc\ptrack_sfunc.cpp C:\Users\Hsien-Chung\Documents\FANUCIntern\LRMate200_Experimentor_hc\PhaseSpace\lib\libowlsock64.lib ..\slprj\slrt\_sharedutils\rtwshared.lib @td_dual_ucb_004_1.lnk @td_dual_ucb_004_1_ref.rsp -out:td_dual_ucb_004_1_xpc.dll
C:\Users\Hsien-Chung\Documents\FANUCIntern\LRMate200_Experimentor_hc\ptrack_sfunc.cpp : fatal error LNK1107: invalid or corrupt file: cannot read at 0x200E
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\link.EXE"' : return code '0x453'
Stop.
The make command returned an error of 2
'An_error_occurred_during_the_call_to_make' is not recognized as an internal or external command,
operable program or batch file.



My Matlab version is R2014b, and the C code compiler is VisualStudio 2010 Express. The system target file is "slrt.tlc", and the template makefile is "slrt_default_tmf". If you have any solution to solve the problem, please let me know. I very appreciate your help!

Hsien-Chung Lin
0 new messages