Linking failed on dSPACE1006 using 2Level S-function

1 Ansicht (letzte 30 Tage)
Hedi BASBAS
Hedi BASBAS am 15 Jan. 2021
Beantwortet: UDAYA PEDDIRAJU am 14 Mai 2024
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 ?!

Antworten (1)

UDAYA PEDDIRAJU
UDAYA PEDDIRAJU am 14 Mai 2024
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.

Kategorien

Mehr zu Embedded Coder finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by