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

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

Re: [avr-gcc-list] Undefined reference - Why?


From: Bernt Hustad Hembre
Subject: Re: [avr-gcc-list] Undefined reference - Why?
Date: Sun, 4 Mar 2001 18:46:51 +0100 (CET)

On Sun, 4 Mar 2001, it was written:

> > It compiles without any errormessages...
> What do you expect ? You are compiling with -O3. If you comment out
> a_function(hoyde) the optimzer recognices that hoyde and trykk are
> calculated but _never_ used. So they will be optimized out. Compile this
> withou any optimization and you get what you expected. You can also try
> "return hoyde" instead of "return 0". 

Ok. I can see why the errormessage dissapairs. But the interesting
question (for me anyway) is why do the errormessage appair in the first
place?

I use pow() like this:

hoyde = pow(2,2);

Whats wrong with this?

math.h defines pow:
extern double pow (double, double) __ATTR_CONST__;

Where do avr-gcc assume to find the objectfile where pow() is included?


Bernie
Tlf.: 92648923
address@hidden




reply via email to

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