- Ensure static libraries are compiled for the correct target architecture and version of macOS, specifying architecture flags if necessary.
- Write your S-function using the appropriate MATLAB API, typically the MEX-function API for C/C++ code.
- Include static libraries and necessary directories in your "mex" compilation command, specifying include paths, library paths, and the library names.
- Manually link all dependent static libraries in the correct order since static libraries don't automatically include their dependencies.
- For complex configurations, consider customizing the "mex" build settings through "mexopts.sh" or "mexopts.bat" files to adjust compiler and linker settings.
- Ensure correct paths, compatible architectures between libraries and the S-function.
Static or Dynamic Library for S-function
8 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am trying to create an S-function to link OpenFAST with Simulink.
I succefully compiled the build libraries using CMake (on Mac OS).
However as I compiled the main .m file to create the Sfunction is face this error:
I read here https://github.com/OpenFAST/openfast/issues/208 that the issue can be due to the use of static (.a) libraries instead of synamic (.dylib).
My question is that can I create the Sfunction with static librairies, if so, how can I fix the issue?
Thanks in Advance
Qusay.
0 件のコメント
回答 (1 件)
Pratyush
2024 年 5 月 17 日
Hi Qusay,
To create an S-function in MATLAB/Simulink that links with OpenFAST using static libraries (.a) on macOS, follow these steps:
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!