Precompiled Static Libraries
Simscape™ and its add-on products provide static libraries precompiled for compilers supported by Simulink® Coder™ software. For details on supported compilers, see Supported and Compatible Compilers. For all other compilers, the static libraries needed by code generated from Simscape models are compiled once per model during the code generation build process.
To save time during the build process, precompile new or updated
S-function libraries (MEX-files) for a model by using the MATLAB® language
function rtw_precompile_libs
(Simulink Coder).
You can also use the rtw_precompile_libs
function
to recompile a precompiled S-function library. Recompiling a precompiled
library allows you to customize compiler settings for various platforms
or environments. For details on using rtw_precompile_libs
,
see Precompile S-Function Libraries (Simulink Coder).
Typically, a target machine places cross-compiled versions of the precompiled libraries in a default location as specified in an rtwmakecfg.m file. The default file suffix and file extension used by the Simulink Coder code generator to name precompiled libraries during the build process are:
On Windows® systems,
model
_rtwlib.libOn UNIX® or Linux® systems,
model
_rtwlib.a
You can control the file destination, location, suffix, and extension by customizing the system target file (STF) for your target hardware. For more information, see Control Library Location and Naming During Build (Simulink Coder) and Use rtwmakecfg.m API to Customize Generated Makefiles (Simulink Coder).
See Also
rtw_precompile_libs
(Simulink Coder)
Related Topics
- Use rtwmakecfg.m API to Customize Generated Makefiles (Simulink Coder)
- Control Library Location and Naming During Build (Simulink Coder)
- Customize Template Makefiles (Simulink Coder)
- Precompile S-Function Libraries (Simulink Coder)