-
-
und wo ist hier der fehler???
#include "asuro.h"
int main(void) {
Init ()
int zaehler; // Variable für’s Zählen deklarieren
for (zaehler=0; zaehler<10; zaehler++) { // zehnmal wiederholen:
SerWrite(“Los geht’s!\n”,12); // “Los geht’s” schicken
}
MotorDir(FWD,FWD); // Beide Motoren auf vorwärts
MotorSpeed(120,120); // Beide Motoren etwa halbe Kraft voraus
while (1) { // Danach nichts mehr machen!
} }
beim compilieren kommt folgendes:
C:\ASURO_src\FirstTry>make all
set -e; avr-gcc -MM -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > test.d; \
[ -s test.d ] || rm -f test.d
-------- begin --------
avr-gcc --version
avr-gcc (GCC) 3.3.1
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Size before:
test.elf :
section size addr
.text 1516 0
.data 0 8388704
.bss 1 8388704
.noinit 0 8388705
.eeprom 0 8454144
.stab 3132 0
.stabstr 1698 0
Total 6347
avr-gcc -c -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.lst test.c -o test.o
test.c: In function `main':
test.c:4: error: parse error before "int"
test.c:5: error: `zaehler' undeclared (first use in this function)
test.c:5: error: (Each undeclared identifier is reported only once
test.c:5: error: for each function it appears in.)
test.c:6: error: stray '\223' in program
test.c:6: error: `Los' undeclared (first use in this function)
test.c:6: error: parse error before "geht"
test.c:6: error: stray '\222' in program
test.c:6: error: stray '\' in program
test.c:6: error: stray '\224' in program
test.c:11:4: warning: no newline at end of file
make: *** [test.o] Error 1
> Process Exit Code: 2
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
-
Foren-Regeln
Lesezeichen