[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Compiler linking error
From: |
Nick Brent |
Subject: |
[avr-gcc-list] Compiler linking error |
Date: |
Fri, 27 Feb 2004 14:18:57 -0800 |
Hey everyone. I checked the archives, but I didn't see an answer to this exact
question. I'm using avr-gcc 3.3.1. What I'm trying to do is create a static
library that I can distribute to others. When I use this command to compile the
project:
avr-gcc -mmcu=atmega128 delay2.o lcdcntrl.o test2.c -o test2.ex
It compiles just fine. The problem I run into is that when I compile a project
with a static library using these commands:
avr-ar -r libtest2.a delay2.o lcdcntrl.o
avr-gcc -mmcu=atmega128 libtest2.a test2.c -o test2.ex
Then I get this error message:
C:\WINDOWS\TEMP/ccULbaaa.o(.text+0xce): In function `main':
: undefined reference to `lcd_init'
C:\WINDOWS\TEMP/ccULbaaa.o(.text+0xe2): In function `main':
: undefined reference to `line1'
The functions 'lcd_init' and 'line1' are contained in the lcdcntrl.o file. I
kept playing around with it, and I found out that when I used the canned
makefile in winavr\sample\makefile and insert the line 'LDFLAGS += libtest2.a'
into the section labeled '# Additional libraries' the program compiles just
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.
Sincerely,
-Nick Brent
_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list
- [avr-gcc-list] Compiler linking error,
Nick Brent <=
- Re: [avr-gcc-list] Compiler linking error, E. Weddington, 2004/02/27
- Re: [avr-gcc-list] Compiler linking error, Nick Brent, 2004/02/27
- Re: [avr-gcc-list] Compiler linking error, E. Weddington, 2004/02/27
- Re: [avr-gcc-list] Compiler linking error, Nick Brent, 2004/02/27
- Re: [avr-gcc-list] Compiler linking error, E. Weddington, 2004/02/27
- Re: [avr-gcc-list] Compiler linking error, Nick Brent, 2004/02/27
- [avr-gcc-list] AVR-JTAG Interface questions?, Douglas Dotson, 2004/02/27
- Re: [avr-gcc-list] Compiler linking error, E. Weddington, 2004/02/28
- [avr-gcc-list] Overlays, Ron Kreymborg, 2004/02/28