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 17:03:51 -0700

On 27 Feb 2004 at 15:33, Nick Brent wrote:

> Hmm. That seemed to do something. I ran avr-ar with the -s option. I think
> took out the 'LDFLAGS += libtest2.a' line that I mentioned earlier, and it
> compiled just fine with make. I then ran a 'make clean' and tried to compile
> with the command:
> 
>     avr-gcc -mmcu=atmega128 -lmyrobot test2.c
> 

Did you read the GCC user manual and how the *position* of the -l parameters 
affect linking?

Go here:
<http://gcc.gnu.org/onlinedocs/gcc-3.3.3/gcc/Link-Options.html#Link%20Options>
and read about -l.

You should probably do:
avr-gcc -mmcu=atmega128 test2.c -lmyrobot
Do you see the difference?

And while you're there, you can read up on -L
<http://gcc.gnu.org/onlinedocs/gcc-3.3.3/gcc/Directory-
Options.html#Directory%20Options>
This tells GCC to search in other directories for libraries.

A lot can be found in the manuals.

_______________________________________________
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]