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 to `__divmodqi4'


From: Guglielmo D.
Subject: Re: [avr-gcc-list] undefined reference to `__divmodqi4'
Date: Tue, 7 Jan 2003 09:14:31 -0500 (EST)

 --- Joerg Wunsch <address@hidden> a écrit : > "Guglielmo D." <address@hidden> 
wrote:
> > I compile like this:
> > 
> > $ avr-gcc -c test.c
> > $ avr-ld test.o -o testing -mavr23xx
> 
> Sure.  That cannot work.  If you prefer to execute the link command
> manually, you need to execute it with all the required arguments.  So
> far, you forgot to at least specify the respective crtX.o file and the
> libraries (-lc).  The use of -mavr23xx is also no longer the
> recommended way.  (But perhaps it still is in your old version of the
> tools, i don't know.  That's another advantage of the approach below,
> it'll automagically handle all this for you.)
> 
> Better use the compiler to organize linking for you:
> 
> $ avr-gcc -o testing -o test.o
> 
> Normally, you should also specify the -mmcu= option that matches your
> device (like -mmcu=at90s2333).  It's only this very minimalistic
> example that works without it (it will silently assume -mmcu=avr2).
> 
> If you add a -v option to the above command line, you'll see the
> arguments gcc is using to call the linker.

yes! now it works! thanks!


> 
> Btw., you should better upgrade to more recent versions of the tools.
> A number of bugs have been fixed since, and the documentation has
> almost been brought up-to-date now.

You mean I should upgrade gcc ?

gcc 3.2.1 is the last release
(ftp://mirrors.laffeycomputer.com/pub/sourceware.cygnus.com/pub/gcc/releases/)

thanks a lot !

__________________________________________________________
Lèche-vitrine ou lèche-écran ?
magasinage.yahoo.ca
avr-gcc-list at http://avr1.org



reply via email to

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