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: J Wunsch
Subject: Re: [avr-gcc-list] Undefined reference - Why?
Date: Mon, 5 Mar 2001 11:42:29 +0100 (MET)

Bernt Hustad Hembre <address@hidden> wrote:

> avr-gcc  tuger.o   -Wl,-Map=tuger.map,--cref -mmcu=at90s4433 -o tuger.elf
> tuger.o: In function `main':
> M:\prosjekt\tuger\hw\firmware/tuger.c:10: undefined reference to `pow'

Add a `-lm' to the linker command line above.  This will include the
math library.  It's a very common error when programming in the Unix
environment.  Unfortunately, there's no way how the `#include
<math.h>' could trigger the linker to also include the appropriate
object code library.
-- 
J"org Wunsch                                           Unix support engineer
address@hidden         http://www.interface-systems.de/~j



reply via email to

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