Hi, yes, because of the static linking it's necessary to use -lm and other options for other libraries as the last option(s). Example:
msp430-gcc -Os -mmcu=msp430x149 -o test2.elf test2.c -lm You can also use the name of the lib(s): msp430-gcc -Os -mmcu=msp430x149 -o test2.elf test2.c /usr/local/msp430/msp430/lib/libm.a That should be put into the FAQs and the manual because it's an often occurring problem because that's an unexpected behavior and the linking is complicated because for some libs like libc it's not necessary and the linking is not specified in ANSI-C. Regards, Rolf [email protected] schrieb am 04.07.05 17:53:32: > > The -lm MUST be your last option. > And you may have to update from CVS. > > nimish hirekodi wrote: > > > Sir, > > > > Still we have the problem of linking library MATH rotines as > > mentioned in our earlier mail. > > As it was suggested by Mr.Rolf,we tried using -lm option and it did > > not help. > > > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Mspgcc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mspgcc-users
