- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Why did PSOC creator say: "Build error: undefined reference to 'sin'" when I compile the code as below,
and I try to set Inline functions true in build settings,but still display the same error.
#include <math.h>
int main(void)
{
double x=0.5;
double y;
for(;;)
{
y = sin(x); //Build error: undefined reference to 'sin'
y = sin(0.5); //this line is available passed
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make these changes to PSoC Creator
1) Click Project
2) click Build Settings
3) open the Linker Settings under ARM GCC 4.9-2015-q1-update
4) under Additional Libraries add an m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Make these changes to PSoC Creator
1) Click Project
2) click Build Settings
3) open the Linker Settings under ARM GCC 4.9-2015-q1-update
4) under Additional Libraries add an m
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried your code and it works with those changes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Bob,it works.