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 CenterFile Exchange에서 Embedded Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by