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

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

AW: AW: AW: [avr-gcc-list] Linking Problems with undefined reference to


From: Peter Hierholzer
Subject: AW: AW: AW: [avr-gcc-list] Linking Problems with undefined reference to'__mulhi3' when using fdevopen on atmega8
Date: Tue, 7 Oct 2003 08:55:17 +0200


> >Linking: test.elf
> >avr-gcc -v -mmcu=atmega8 -DF_MCU=16000000 -I. -g -Os -funsigned-char
> >-funsigned-bitfields -fpack-struct -fshort-enums -W
> >all -Wstrict-prototypes -Wa,-adhlns=test.o -I. -Ic:/avr/source/include
> >-std=gnu99 test.o  --output test.elf -Wl,-Map=tes
> >t.map,--cref -Lc:/winavr/avr/lib -Lc:/avr/source/uart/
>               ^^^^^^^^^^^^^^^^^^^
> 
> This is the mistake.  You explicitly request -Lc:/winavr/avr/lib as a
> library search path on the compiler command-line

You are right it is in the makefile. 

I needed an additional library "c:\avr\Source\uart\libuart_atmega8.a". I
used the already existing DIRLIB define "DIRLIB = $(DIRAVR)/avr/lib" and
added my library path to it. "DIRLIB = $(DIRAVR)/avr/lib
c:/avr/source/uart/". With "$(patsubst %,-L%,$(DIRLIB))" I added this
library paths to the LDFLAGS define.

I change it back and use "LDFLAGS += -Lc:/avr/source/uart/ -luart_$(MCU)"

Thanks for your help

Peter




reply via email to

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