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: Nick Brent
Subject: Re: [avr-gcc-list] Compiler linking error
Date: Fri, 27 Feb 2004 16:25:39 -0800

Yep. Your right. The command

    avr-gcc -mmcu=atmega128 -lmyrobot test2.c

give me the error, but the command

    avr-gcc -mmcu=atmega128 test2.c -lmyrobot

compiles just fine. Thanks for the link to the GCC manual. I've been using
'GCC the Complete Reference' by Arthur Griffith, and I didn't see anything
about order in the syntax. Thanks for the help.

                                                    -Nick

----- Original Message -----
From: "E. Weddington" <address@hidden>
To: "AVR-GCC List" <address@hidden>; "Nick Brent"
<address@hidden>
Sent: Friday, February 27, 2004 4:03 PM
Subject: Re: [avr-gcc-list] Compiler linking error


> 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%20Option
s>
> 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]