s-function linking failed, dspace

8 次查看(过去 30 天)
Robin
Robin 2014-7-16
编辑: Ulijadui 2018-8-21
I got a s-function and a simulink model containing stuff from a dspace library. Now i would like to compile it. I already solved some compiling errors and in the meantime I'm using the same Matlab version as the people who originally made the s-function and the simulink model. Unfortunately, I always get a "linking failed" error and I have no idea how to solve this problem.
________________________________________________________________
COMPILING "dag_epas_rt_actr_auto_rti1401_TKP_app.c" COMPILING "dag_epas_rt_actr_auto_rti1401_TKP_app_data.c" COMPILING "dag_epas_rt_actr_auto_rti1401_TKP_app_trc_ptr.c" COMPILING "rtGetInf.c" COMPILING "rtGetNaN.c" COMPILING "rt_nonfinite.c" COMPILING "rt_sfcn_helper.c" COMPILING "rt_zcfcn.c" COMPILING "C:\Program Files (x86)\dSPACE RCPHIL 2013-B\MATLAB\RTI\RTI\C\rti_sim_engine.c"
LINKING APPLICATION ... < lnkppc > (E) #A0368-D Unresolved external: Application_sf (first referenced in module: dag_epas_rt_actr_auto_rti1401_TKP_app.o03) Application_DefaultParameters (first referenced in module: dag_epas_rt_actr_auto_rti1401_TKP_app.o03) Application_InvariantSignals (first referenced in module: dag_epas_rt_actr_auto_rti1401_TKP_app.o03) Errors: 1, Warnings: 0 -- call "C:\Program Files (x86)\dSPACE RCPHIL 2013-B\Compiler\PPCTools\BIN\lnkppc.exe" -K0 -QmsA0314 -QmsA0407 -QmeA0307 -QmeA0329 -m..\dag_epas_rt_actr_auto_rti1401_TKP_app.map -o ..\dag_epas_rt_actr_auto_rti1401_TKP_app.ppc -c _tmp_dag_epas_rt_actr_auto_rti1401_TKP_app.lk LINKING FAILED (1)
MAKE PROCESS ABORTED
---------------------------------------------------------------------- * Errors occurred during make process. * Inspect MATLAB Command Window for details. * Aborting RTI build procedure for model dag_epas_rt_actr_auto_rti1401_TKP_app. ---------------------------------------------------------------------- * Stopped RTI build procedure for model: dag_epas_rt_actr_auto_rti1401_TKP_app. ---------------------------------------------------------------------- ________________________________________________________________
Thank you for your help in advance!

回答(2 个)

Hans Vader
Hans Vader 2018-8-2
Hi, i had the same problem and fixed it by doing the following:
Open your Matlab Model -> open block parameters of your s-function -> insert your including file names in 'S-function modules' -> apply + ok + rebuild.
Hope this helps!
Greetings H. Vader
  1 个评论
Ulijadui
Ulijadui 2018-8-21
编辑:Ulijadui 2018-8-21
Hi, thanks for ur help.But what should be the "including file"?Take Robin's code above for example,what is the'Unresolved external'?I think they should be parameters (such as 'Application_sf' in his code)but where should I found the files, which contains this parameters? thx!

请先登录,再进行评论。


Ulijadui
Ulijadui 2018-7-24
Dear Robin, have u solve this problem then? I have the same problem now. Could u please tell me sth. about the solution? thx. Best Regards Tingting

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by