FMU generated by Matlab 2024b shows Matlab shared library dependencies
17 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi there,
I have been given an FMU generated by Simulink (Matlab 2024). This is Co-Simulation.
In the past I managed to call the generated FMU from c++ in Linux.
However I received a new FMU which shows the following shared libraries needed when running "readelf -d fmu_library.so"
0x0000000000000001 (NEEDED) Shared library: [libmwsl_cosim_service_deploy.so]
0x0000000000000001 (NEEDED) Shared library: [libmwi18n.so]
0x0000000000000001 (NEEDED) Shared library: [libmwfl.so]
0x0000000000000001 (NEEDED) Shared library: [libmwfoundation_filesystem.so]
0x0000000000000001 (NEEDED) Shared library: [libmex.so]
0x0000000000000001 (NEEDED) Shared library: [libmx.so]
0x0000000000000001 (NEEDED) Shared library: [libmat.so]
0x0000000000000001 (NEEDED) Shared library: [libmwsl_services.so]
0x0000000000000001 (NEEDED) Shared library: [libmwboost_system.so.1.81.0]
0x0000000000000001 (NEEDED) Shared library: [libmwcpp11compat.so]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
It was my understanding that Matlab-generated FMUs don't require external dependencies but I can see libmex.so and libmat.so which I guess they are Matlab dependencies. Does it mean I need to install the SDK with the dependencies?
0 Commenti
Risposte (1)
Kautuk Raj
il 3 Lug 2025
Yes, you need the MATLAB/Simulink shared libraries available at runtime.
This is a change from older FMU exports, which often produced "standalone" binaries with all dependencies statically linked or minimal system dependencies.
In your MATLAB installation, make sure the bin/glnxa64 (or similar) directory containing these .so files is in your LD_LIBRARY_PATH.
For deployment without a full MATLAB, you can use MATLAB Runtime: https://www.mathworks.com/products/compiler/matlab-runtime.html
Please refer to the following documentation page from MathWorks from more details: https://www.mathworks.com/help/slcompiler/gs/export-simulink-models-to-functional-mock-up-units.html
0 Commenti
Vedere anche
Categorie
Scopri di più su Deploy Standalone Applications 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!