avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] strange behaviour with ceil()


From: Jamie Morken
Subject: [avr-gcc-list] strange behaviour with ceil()
Date: Wed, 24 Jul 2002 21:32:06 -0700

Hi,

The code below gives errors of
undefined reference to 'sin'  and
undefined reference to 'ceil'

When I remove the line:
"m = ceil(a);"

the errors go away but I need to use ceil in my code.
I spent an hour trying to find why this is an error with no luck! 
Please help! :)

Here is the code that has an error in it somewhere..:

#include <io.h>
#include <progmem.h>
#include <float.h>
#include <math.h>  

int calc()
{
float a;
float m;
a = sin(30);
m = ceil(a);
return m;
}

int main(void)
{
float i;
i = calc();
}




avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]