Lesson KB 05: Using Math Function in PSoC Creator for GCC Compiler – KBA93076
If you need to use math functions in PSoC Creator 3.x (or later version) for the PSoC 5LP project by using GCC Compiler, you have to add the math library into your project. If you do not add the math library then you will get the build error "Undefined reference to xxx" (where xxx is a math function).
The following steps show how to add math library to your project.
- Click Project
- Click Build Settings
- Open the Linker settings under ARM GCC 4.7.3 and click General
- Under Additional Libraries, add m
These steps are shown in Figure 1: