How to set the code replacement library to C89/C90 (ANSI) in Matlab r2016b

19 views (last 30 days)
Hello, I'm having trouble with compiling Simulink models that contain min/max blocks.
I'm using Visual Studio 2012 as a compiler (Matlab r2016b).
I've found in an old thread from 2011, that I need to set the Code Replacement Library to "C89/C90 (ANSI)" but that option is not available in the Configuration Settings pane within this Matlab version.
From the list below, is there any options that corresponds to "C89/C90 (ANSI)" ?
Thanks in advance
GNU C99 extensions
Generates calls to the GNU® gcc math library, which provides C99 extensions as defined by compiler option -std=gnu99.
AUTOSAR 4.0
Produces code that more closely aligns with the AUTOSAR standard. Requires an Embedded Coder® license.
Intel IPP for x86-64 (Windows)
Generates calls to the Intel® Performance Primitives (IPP) library for the x86-64 Windows® platform.
Intel IPP/SSE for x86-64 (Windows)
Generates calls to the IPP and Streaming SIMD Extensions (SSE) libraries for the x86-64 Windows platform.
Intel IPP for x86-64 (Windows using MinGW compiler)
Generates calls to the IPP library for the x86-64 Windows platform and MinGW compiler.
Intel IPP/SSE for x86-64 (Windows using MinGW compiler)
Generates calls to the IPP and SSE libraries for the x86/Pentium Windows platform.
Intel IPP for x86/Pentium (Windows)
Intel IPP for x86/Pentium (Windows)—Generates calls to the IPP library for the x86/Pentium Windows platform.
Intel IPP/SSE for x86/Pentium (Windows)
Intel IPP for x86/Pentium (Windows)—Generates calls to the IPP and SSE libraries for the x86/Pentium Windows platform.
Intel IPP for x86-64 (Linux)
Generates calls to the IPP library for the x86-64 Linux® platform.
Intel IPP/SSE with GNU99 extensions for x86-64 (Linux)

Accepted Answer

Sebastian
Sebastian on 29 Oct 2020
Hi Sebastian,
sorry to see that your question was somehow ignored for some time.
I couldn't either find the option in the GUI on Matlab r2016b, but following code at the command window should do the job:
set_param(mymodel,'TargetLangStandard','C89/C90 (ANSI)')
Hopefully works for you.
Best Regards

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products


Release

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!