B³êdy kompilacji

Feb 24, 2004 3 Replies

Próbowa³em uruchomiæ przyk³adowy programik wy¶wietlacza LCD, po skompilowaniu wskoczy³y mi takie b³êdy :



D:\Documents/test_lcd.c:59: undefined reference to `lcd_init' test_lcd.o(.text+0x2e):D:\Documents/test_lcd.c:69: undefined reference to `lcd_clrscr' test_lcd.o(.text+0x34):D:\Documents/test_lcd.c:72: undefined reference to `lcd_puts' test_lcd.o(.text+0x3a):D:\Documents/test_lcd.c:75: undefined reference to `lcd_puts' test_lcd.o(.text+0x40):D:\Documents/test_lcd.c:78: undefined reference to `lcd_gotoxy'



Dodam jeszcze ¿e mam dodan± bibliotekê z funkcjami doobslugi wy¶wietlacza. Program jest kompilowany w najnowszej wersji programu WinAvr.



Jak temu zaradziæ ??


Pozdrawiam Krzysiek

W artykule Cris napisal(a):

W makefile dodaæ bibliotekê w opcjach linkera?

Pozdrawiam

Marcin Stanisz

"A lie will go round the world before the truth has got its boots on" Terry Pratchett, "Truth"

Nie bardzo wiem jak, ale plik (biblioteka LCD) zosta³ przekopiowanywe w³a¶ciwe miejsce i w programie jest dodana ta biblioteka ( include ...) . A mo¿e nie oto chodzi ?? Niewiem.

Pozdrawiam Krzysiek

Cris:

to nie s± b³êdy kompilacji, tylko linkera. Kompilacja przesz³a bez bólu (dziêki include), ale linker nie wie, gdzie tych modu³ów szukaæ. Musisz podaæ bibliotekê, gdzie siê toto znajduje w makefile, tam, gdzie siê linker wywo³uje, jak Marcin napisa³.

Waldek

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required