forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

lammy Q : error undefined reference to `sinf'

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Shinen



Joined: 18 Oct 2005
Posts: 8
Location: Moscow

PostPosted: Sun Oct 23, 2005 3:25 am    Post subject: lammy Q : error undefined reference to `sinf' Reply with quote

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
View user's profile Send private message
Shinen



Joined: 18 Oct 2005
Posts: 8
Location: Moscow

PostPosted: Sun Oct 23, 2005 4:16 am    Post subject: Reply with quote

nevermind
so .... looks like no such functions available and must write my own ...
Back to top
View user's profile Send private message
sandberg



Joined: 05 Oct 2005
Posts: 90
Location: Denmark

PostPosted: Sun Oct 23, 2005 4:50 am    Post subject: Reply with quote

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
View user's profile Send private message
Shinen



Joined: 18 Oct 2005
Posts: 8
Location: Moscow

PostPosted: Sun Oct 23, 2005 5:04 am    Post subject: Reply with quote

sandberg

thanks for reply :) i'm already resolve this problem (sdk update and -lm) thanks to chp on #amycoders channel :)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group