ARM Technical Support Knowledge Articles

Building a C++ project without floating-point libraries

Applies to: DS-5


Some of the C++ library headers implicitly include floating-point libraries. This means that depending on the header files included in a project, floating-point libraries might be linked into the final image even if the source code does not use any floating-point operations. This has the following effects:

For example, consider a source file that does not use any floating-point functions or operations and includes the iostream header file.  Compiling this source file with --fpu=none or --fpmode=none will generate compilation errors because iostream implicitly includes math.h which contains floating-point function declarations.

The Rogue Wave C++ library shipped with ARM Compiler 5 does not contain separate versions of the headers or run-time libraries built without floating-point operations (software-emulated or hardware floating-point).  Therefore, to avoid such errors and potential increased code size when compiling C++ code, you may need to develop custom C++ header and library implementations that do not include floating-point data or operations.

Article last edited on: 2015-12-18 16:20:47

Rate this article

Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential