Skocz do zawartości

[C] [Rozwiązane]Problem z HD44780.c ATMEGA 8


Pomocna odpowiedź

Napisano

Witam, mam problem kiedy w Eclipse buduję program pojawia się taki błąd i nie wiem dlaczego.

Biblioteka HD44780 jest od Radzia - http://radzio.dxp.pl/hd44780/

Błąd:

19:15:39 **** Incremental Build of configuration Release for project 01_TEST ****
make all 
'Building file: ../main.c'
'Invoking: AVR Compiler'
avr-gcc -Wall -Os -fpack-struct -fshort-enums -ffunction-sections -fdata-sections -std=gnu99 -funsigned-char -funsigned-bitfields -mmcu=atmega8 -DF_CPU=8000000UL -MMD -MP -MF"main.d" -MT"main.o" -c -o "main.o" "../main.c"
'Finished building: ../main.c'
' '
'Building target: 01_TEST.elf'
'Invoking: AVR C Linker'
avr-gcc -Wl,-Map,01_TEST.map -mmcu=atmega8 -o "01_TEST.elf"  ./HD44780.o ./main.o   
./main.o: In function `_LCD_OutNibble':
main.c:(.text._LCD_OutNibble+0x0): multiple definition of `_LCD_OutNibble'
./HD44780.o:HD44780.c:(.text._LCD_OutNibble+0x0): first defined here
./main.o: In function `_LCD_Write':
main.c:(.text._LCD_Write+0x0): multiple definition of `_LCD_Write'
./HD44780.o:HD44780.c:(.text._LCD_Write+0x0): first defined here
./main.o: In function `LCD_WriteCommand':
main.c:(.text.LCD_WriteCommand+0x0): multiple definition of `LCD_WriteCommand'
./HD44780.o:HD44780.c:(.text.LCD_WriteCommand+0x0): first defined here
./main.o: In function `LCD_WriteData':
main.c:(.text.LCD_WriteData+0x0): multiple definition of `LCD_WriteData'
./HD44780.o:HD44780.c:(.text.LCD_WriteData+0x0): first defined here
./main.o: In function `LCD_WriteText':
main.c:(.text.LCD_WriteText+0x0): multiple definition of `LCD_WriteText'
./HD44780.o:HD44780.c:(.text.LCD_WriteText+0x0): first defined here
./main.o: In function `LCD_GoTo':
main.c:(.text.LCD_GoTo+0x0): multiple definition of `LCD_GoTo'
./HD44780.o:HD44780.c:(.text.LCD_GoTo+0x0): first defined here
./main.o: In function `LCD_Clear':
main.c:(.text.LCD_Clear+0x0): multiple definition of `LCD_Clear'
./HD44780.o:HD44780.c:(.text.LCD_Clear+0x0): first defined here
./main.o: In function `LCD_Home':
main.c:(.text.LCD_Home+0x0): multiple definition of `LCD_Home'
./HD44780.o:HD44780.c:(.text.LCD_Home+0x0): first defined here
./main.o: In function `LCD_Initalize':
main.c:(.text.LCD_Initalize+0x0): multiple definition of `LCD_Initalize'
./HD44780.o:HD44780.c:(.text.LCD_Initalize+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
make: *** [01_TEST.elf] Błąd 1

19:15:39 Build Finished (took 509ms)

Kod: https://code.nastoletni.pl/GnAMx/7d685b56

[ Dodano: 20-11-2017, 19:30 ]

A przepraszam, wystarczyło zamienić z HD44780.c na HD44780.h

Bądź aktywny - zaloguj się lub utwórz konto!

Tylko zarejestrowani użytkownicy mogą komentować zawartość tej strony

Utwórz konto w ~20 sekund!

Zarejestruj nowe konto, to proste!

Zarejestruj się »

Zaloguj się

Posiadasz własne konto? Użyj go!

Zaloguj się »
×
×
  • Utwórz nowe...