Hi all!

I just find the solution, i have include this line on my Makefile :
LDFLAGS += -lm

And now it works:!!

Thanks to all!
Sébastien

> Message du 22/05/08 à 18h33
> De : "Roberto Asquini" <[EMAIL PROTECTED]>
> A : [email protected]
> Copie à : 
> Objet : [foxboard] Re: Trigonometrics function
> 
> Hi Sebastien,
> 
> to execute successfully on the Fox programs that use math C library functions
> like cos() and sin() you have to include the +libm directive in the linker
> directives of your Makefile.
> 
> Try to follow this step by step article:
> http://www.acmesystems.it/?id=59   Using The Math Library with the Fox
> 
> and let me know if you need help.
> 
> Best regards,
> 
> Roberto Asquini
> 
> --- In [email protected], sebphi <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >
> > I still cannot compile my project with cos() and sin() function. I
> don't know why. It seems taht libm is not here. Why and what i could do?
> >
> > Thank for your help
> >
> > Sébastien
> >
> >
> > > Message du 20/05/08 Ã  22h41
> > > De : "Alessandro Rubini" <[EMAIL PROTECTED]>
> > > A : [email protected]
> > > Copie à :
> > > Objet : Re: [foxboard] Trigonometrics function
> > >
> > >
> > > > lcd.c:126: undefined reference to `cos'
> > >
> > > This is definitely a missing libm.
> > >
> > > > Even if i include "math.h" with or not -lm compilation parameters
> > >
> > > "-lm" works for me, as expected:
> > >
> > >   ostro% cat > /tmp/trig.c
> > >   int main(int argc, char **argv) {return sin(atof(argv[1]));}
> > >   ^D
> > >   ostro% gcc /tmp/trig.c -o /tmp/trig
> > >   /tmp/cc6DCmZH.o(.text+0x2c): In function `main': undefined
> reference to `sin'
> > >   collect2: ld returned 1 exit status
> > >   Exit 1
> > >   ostro% gcc -lm /tmp/trig.c -o /tmp/trig
> > >   ostro%
> > >
> > > But please note that some toolchains require "-lm" to go last
> (i.e., _after_
> > > the source or object file where the undefined symbol is encountered).
> > >
> > > /alessandro
> > >
> >
> > ____________________________________________________
> >
> > Vous aussi bénéficiez d'1 Go de stockage gratuit en ligne avec Voila
> > http://macle.voila.fr
> >
> 
> 
> 

____________________________________________________

Vous aussi bénéficiez d'1 Go de stockage gratuit en ligne avec Voila  
http://macle.voila.fr


Reply via email to