| View previous topic :: View next topic |
| Author |
Message |
Shinen
Joined: 18 Oct 2005 Posts: 8 Location: Moscow
|
Posted: Sun Oct 23, 2005 3:25 am Post subject: lammy Q : error undefined reference to `sinf' |
|
|
Hi all.
Have to start write something under psp and confuzed with such linker error:
undefined reference to `sinf'
so, i'm compile well few examples which used sinf and cosf. Try to understand my mistake but cant find it :( i'm use same includes and makefile but nothing ... so may be i miss something - can anyone can help with such, i guess, lame propblem ;)
p.s. so don't use C a long time (last 5-6 year write only on asm for MCU) and forget it completely... so trying to relearn it anew. |
|
| Back to top |
|
 |
Shinen
Joined: 18 Oct 2005 Posts: 8 Location: Moscow
|
Posted: Sun Oct 23, 2005 4:16 am Post subject: |
|
|
nevermind
so .... looks like no such functions available and must write my own ... |
|
| Back to top |
|
 |
sandberg
Joined: 05 Oct 2005 Posts: 90 Location: Denmark
|
Posted: Sun Oct 23, 2005 4:50 am Post subject: |
|
|
sinf does exist (along a lot of other math functions), but you need to link with the math library. add -lm when you link (you must add it before the objectfile or code that uses it).
If you can't make it work, then post your makefile, and I'll take a look. _________________ Br, Sandberg |
|
| Back to top |
|
 |
Shinen
Joined: 18 Oct 2005 Posts: 8 Location: Moscow
|
Posted: Sun Oct 23, 2005 5:04 am Post subject: |
|
|
sandberg
thanks for reply :) i'm already resolve this problem (sdk update and -lm) thanks to chp on #amycoders channel :) |
|
| Back to top |
|
 |
|