Linking failed on dSPACE1006 using 2Level S-function

2 ビュー (過去 30 日間)
Hedi BASBAS
Hedi BASBAS 2021 年 1 月 15 日
回答済み: UDAYA PEDDIRAJU 2024 年 5 月 14 日
I have a problem in the build process of my Simulink model which contains only 1 S-function. In the code of this S-Function, I call 4 external routines "FAST_Start", "FAST_Update" etc ... which are defined in a header file "FAST_Library.h" with this writing :
"EXTERNAL_ROUTINE void FAST_Sizes(double *TMax, double *InitInputAry, char *InputFileName, int *AbortErrLev, int * NumOuts, double * dt, int *ErrStat, char *ErrMsg, char *ChannelNames);"
The access of the function contents is possible with the library : FAST_Library_Win32.dll or FAST_Library_Win32.lib.
Thus the mex file is well done and the simulation works well on Simulink. However, when I want to build it on dSPACE1006 target, I get the following errors :
I understand that the linking process tries to find these functions but they seem to but not defined. It would mean that he could not find my libraries, right ?
Maybe there are additionnal steps to configure entire build process ?!

回答 (1 件)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU 2024 年 5 月 14 日
Hi Hedi,
Cause: Linker can't find function definitions from external libraries (FAST_Library.h).
Solutions:
  1. Configure Build Process: Refer to "dSPACE" documentation for adding custom libraries to the build process (e.g., specifying library paths).
  2. Provide Library Files: Ensure necessary library files (.dll or .lib) are included in the "dSPACE" target build directory.
  3. Consider Header-Only Library: If possible, rewrite external functions as header-only functions to eliminate separate library files.

カテゴリ

Help Center および File ExchangeEmbedded Coder についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by