Hi Andi!

Maybe you haven't link the mathematical library!
In order to access the mathematical functions that are declared in <math.h>, 
the linker needs to be told to also link the library, libm.a. Typically, 
system libraries like libm.a are given to the final C compiler command line 
that performs the linking step by adding a flag -lm at the end.

Regards,
Thomas

----- Original Message -----
From: "andi" <[EMAIL PROTECTED]>
To: <avr-gcc-list@nongnu.org>
Date: Tue, 3 Apr 2007 13:35:28 +0700
Subject: [avr-gcc-list] float type

> Hi,
> 
> 
> I want to use float type in my code, but after i compile it, the avr-gcc 
> not the generate code for the variable:
> 
> ....
>  float x = 1.23;
>  x = x*2;
>  sei();
> ....
> 
>  320:Freq.c        ****  float x = 1.23;
>  321:Freq.c        ****  x = x*2;
>  322:Freq.c        ****   
>  323:Freq.c        ****  sei();
>  614                .LM76:
>  615                /* #APP */
>  616 0258 7894        sei
>  617                /* #NOAPP */
>  618                .L43:
> 
> 
> Am I miss something ? I use WinAVR-20040720.
> 
> 
> Andi
> 
> 
> 
> _______________________________________________
> AVR-GCC-list mailing list
> AVR-GCC-list@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
> 
> 


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to