Main Content

Select C or C++ Programming Language

The default programming language selection for code generation is C language. In the code generation workflow, after the steps in Select a Solver That Supports Code Generation and Select a System Target File from STF Browser, an optional step is to change the programming language selection for code generation.

To change the programming language setting:

  1. In the Configuration Parameters dialog box, from the Language list, select C or C++. Alternatively, set the TargetLang parameter at the command line.

    The code generator produces .c or .cpp files, depending on your selection, and places the generated files in your build folder.

    For more information, see Language.

  2. Check whether you must choose and configure a compiler. If you select C++, you must choose and configure a compiler. For details, see Select and Configure C or C++ Compiler.

  3. Check whether the language standard is configured for your compiler. By default, the code generator uses the ISO®/IEC 9899:1999 C (C99 (ISO)) library for the C language and the ISO/IEC 14882:2003 C++ (C++03 (ISO)) library for the C++ language.

    For more information, see Language standard.

Related Topics