mam taki program w C++:
po kolmilacji w Programmers notepad 2 (WinAVR) poprzez MakeAll
pojawiają się błedy:
a jak kod jest bez instrukcji
to kompiluje się bez problemu
why?[/code]
#include <avr/io.h>
#define LED_ON sbi(DDRB,PB1);sbi(PORTB,PB1)
int main (void)
{
LED_ON;
for (;;)
{
}
return (0);
}po kolmilacji w Programmers notepad 2 (WinAVR) poprzez MakeAll
pojawiają się błedy:
Cytat:
> "make.exe" all
avr-gcc -g -Wall -O2 -mmcu=atmega8 -c -o led.o led.c
led.c: In function `main':
led.c:11: warning: implicit declaration of function `sbi'
led.c:27:2: warning: no newline at end of file
avr-gcc -g -Wall -O2 -mmcu=atmega8 -Wl,-Map,led.map -o led.elf led.o
led.o: In function `main':
C:\Documents and Settings\norbert\Pulpit\led/led.c:11: undefined reference to `sbi'
C:\Documents and Settings\norbert\Pulpit\led/led.c:11: undefined reference to `sbi'
make.exe: *** [led.elf] Error 1
> Process Exit Code: 2
> Time Taken: 00:00
a jak kod jest bez instrukcji
Cytat:LED_ON;
to kompiluje się bez problemu
why?[/code]