- 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
    4 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
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 Commenti
Risposte (1)
  Pratyush
      
 il 17 Mag 2024
        Hi Qusay,
To create an S-function in MATLAB/Simulink that links with OpenFAST using static libraries (.a) on macOS, follow these steps:
0 Commenti
Vedere anche
Categorie
				Scopri di più su Call Python from MATLAB in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

