Documentation

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 inSelect a Solver That Supports Code GenerationandSelect 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 theLanguagelist, selectCorC++. Alternatively, set theTargetLangparameter at the command line.

    The code generator produces.cor.cpp文件,根据selection, and places the generated files in your build folder.

    For more information, seeLanguage.

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

  3. Check whether the standard math library 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, seeStandard math library.

Related Topics