Hi Ralf try __ieee754_logf __ieee754_expf looks like I forgot to add strait calls of these functions... cheers, ~s
On Thursday 02 June 2005 10:28, Ralf Hildebrandt wrote: > Hi! > > I'm using msp430-gcc in a CVS-checkout version from 01.07.2004 (a little > bit old, but I'm not the administrator). > > If I try to compile the following dummy > program > /************************************************************************** >*******/ #include <stdlib.h> > #include <msp430x14x.h> > #include <math.h> > > int main (void) { > float a,b; > > a = 1.2345; > b = exp(a) + sin(a) + log(a); > P1OUT = (char)b; > > return > CPUOFF; > } > /************************************************************************** >*******/ > > with the command > > msp430-gcc -g -O2 -mmcu=msp430x149 -lm dummyprogram.c -o dummyprogram.elf > > I get the errors > > .. undefined reference to `exp' > .. undefined reference to `sin' > .. undefined reference to `log' > > If I change the command to > > msp430-gcc -g -O2 -mmcu=msp430x149 dummyprogram.c -o dummyprogram.elf -lm > > I get only the errors > > .. undefined reference to `exp' > .. undefined reference to `log' > > > The option -lm is given everytime and therefore math.h should be linked to > the program, but it fails. It fails completely, if -lm is given as one of > the first options. If it is given at the end of the command line, the > sin(x) function from math.h is linked, but none of the other tested > functions. > > Where is my error? Is it a bug of my old MSPGCC version? > > Thanks for help! > Ralf > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > Mspgcc-users mailing list > Mspgcc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mspgcc-users