| Contents | Index |
rtw_precompile_libs('model',
build_spec)
rtw_precompile_libs('model', build_spec) builds libraries within model, according to the build_spec arguments, and places the libraries in a precompiled folder.
Build the libraries in my_model without building my_model:
% Specify the library suffix
if isunix
suffix = '.a';
else
suffix = '_vc.lib';
end
set_param(my_model, 'TargetLibSuffix', suffix);
% Set the prcompiled library folder
set_param(my_model, 'TargetPreCompLibLocation', fullfile(pwd,'lib'));
% Define a build specification that specifies the location of the files to compile.
build_spec = [];
build_spec.rtwmakecfgDirs = {fullfile(pwd, 'src')};
% Build the libraries in 'my_model'
rtw_precompile_libs(my_model, build_spec);
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |