s-function link error when build for rtw, dspace ?

5 ビュー (過去 30 日間)
Myunghee
Myunghee 2013 年 8 月 22 日
コメント済み: Hedi BASBAS 2021 年 1 月 15 日
I got a third party library and I would like to use it. I made a s-function to use the library, and it was compiled well when I typed mex sfuntest.c my_alg.c threeSpace.lib and I could use in simulink.
But, when I implemented the function in the simulink for rtw and build model for dSpace (xPC, stand alone) I got an link error as shown below.
---------------------------------------------
LINKING APPLICATION ... < lnkppc > (E) #A0368-D Unresolved external: createTSDevice (first referenced in module: my_alg.o04) getFirstAvailableTSSComPort (first referenced in module: my_alg.o04) Errors: 1, Warnings: 0 -- call "C:\PPCTools37\BIN\lnkppc.exe" -QmsA0407 -QmsA0314 -QmeA0307 -QmeA0329 -m..\untitled.map -o ..\untitled.ppc -c _tmp_untitled.lk LINKING FAILED (1)
-------------------------------------------------
I modifed *usr.mk file to inlcude the myal.c and threeSpace.lib. How could I solve this problem?
My one concern is that the library is dynamic library. Can it be a problem? Thank you for your help in advance!
Myunghee Kim

回答 (1 件)

Kaustubha Govind
Kaustubha Govind 2013 年 8 月 22 日
To add custom S-function related build rules for code generation, you need to implement a rtwmakecfg.m file and place it in the same folder as the S-function.
  3 件のコメント
Anna Waszkiel
Anna Waszkiel 2017 年 9 月 27 日
Hello, did You manage to fix this error? I am facing quite the same problem. Anna
Hedi BASBAS
Hedi BASBAS 2021 年 1 月 15 日
Hi, I have also the same problem. anyone solve it ?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeNaming Conventions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by