- Configure Build Process: Refer to "dSPACE" documentation for adding custom libraries to the build process (e.g., specifying library paths).
- Provide Library Files: Ensure necessary library files (.dll or .lib) are included in the "dSPACE" target build directory.
- Consider Header-Only Library: If possible, rewrite external functions as header-only functions to eliminate separate library files.
Linking failed on dSPACE1006 using 2Level S-function
2 次查看(过去 30 天)
显示 更早的评论
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 ?!
0 个评论
回答(1 个)
UDAYA PEDDIRAJU
2024-5-14
Hi Hedi,
Cause: Linker can't find function definitions from external libraries (FAST_Library.h).
Solutions:
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!