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

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

Re: [avr-gcc-list] Compiler linking error


From: E. Weddington
Subject: Re: [avr-gcc-list] Compiler linking error
Date: Fri, 27 Feb 2004 16:13:01 -0700

On 27 Feb 2004 at 14:56, Nick Brent wrote:

> > > fine. I'm assuming there is some command line argument that avr-gcc
> needs that
> > > the regular gcc compile doesn't, but what is it? Any and all help is
> > > appreciated.
> > >
> >
> > avr-gcc -mmcu=atmega128 test2.c -o test2.ex -ltest2
> >
> > Note:
> > 1. -l flag (lowercase L). See GCC user manual.
> > 2. Position of library, generally after the other objects. Again see GCC
> user
> > manual.
> >
> 
> Thanks for the response. The -l flag only works if the library 'libtest2.a' is
> in a specific location such as /lib or /avr/lib. Thats not a problem, but
> weather or not I put it there or call it from the current directory, I still 
> get
> the linking error. There is some problem I'm having with telling avr-gcc to 
> look
> inside the library. That's why it works just fine when I use the object files
> directly.
> 

Did you run avr-ranlib over your library? or alternatively use the -s flag with 
avr-ar? This creates an index in your library; it might be what you need. See 
the GNU Binutils manual for more information.

_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list


reply via email to

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