Main Content

Change the Standard Math Library

For calls to math operations, the code generator uses the standard math library that you specify in the build settings. The default standard math library depends on the language that you select. For C, it is C99 (ISO). For C++, it is C++11 (ISO).

You can change the standard math library to one of these libraries.

Library NameLanguage SupportStandard
C89/C90 (ANSI)C, C++ISO®/IEC 9899:1990
C99 (ISO)C, C++ISO/IEC 9899:1999
C++03 (ISO)C++ISO/IEC 14882:2003
C++11 (ISO)C++ISO/IEC 14882:2011(E)

The C++03 (ISO) and C++11 (ISO) math libraries are available only if the language is C++.

To change the library:

  • In the project build settings, on the Custom Code tab, set the Standard math library parameter.

  • In a code configuration object, set the TargetLangStandard parameter.

Verify that your compiler supports the library that you want to use. If you select a library that your compiler does not support, compiler errors can occur.

Related Topics