Hallo zusammen. Immer wenn ich im PN was compilieren möchte bringt dieser mir folgende Meldung: -------- begin -------- avr-gcc --version avr-gcc (GCC) 3.3 20030421 (prerelease) Copyright (C) 2002 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. make: *** No rule to make target `main.o', needed by 'main.elf'. Stop. > Process Exit Code: 2 Kann mir jemand weiterhelfen? mfg tronic
Vielen Dank für die Hilfe.
Jetzt kommt der Complier zwar schon ein wenig weiter aber er scheitert
wieder:
set -e; avr-gcc -MM -mmcu=at90s8515 -I. -g -Os -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall
-Wstrict-prototypes -Wa,-ahlms=main.lst main.c \
| sed 's,\(.*\)\.o[ :]*,\1.o \1.d : ,g' > main.d; \
[ -s main.d ] || rm -f main.d
-------- begin --------
avr-gcc --version
avr-gcc (GCC) 3.3 20030421 (prerelease)
Copyright (C) 2002 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.
avr-gcc -c -mmcu=at90s8515 -I. -g -Os -funsigned-char
-funsigned-bitfields -fpack-struct -fshort-enums -Wall
-Wstrict-prototypes -Wa,-ahlms=main.lst main.c -o main.o
main.c:4: warning: return type of `main' is not `int'
make: *** No rule to make target `foo.o', needed by `main.elf'. Stop.
> Process Exit Code: 2
> main.c:4: warning: return type of `main' is not `int' Standard-C kennt zwei gültige Prototypen für main(): int main(void); int main(int, char **); Du solltest Dein main() also sinnvollerweise als Typ int deklarieren und am Ende ein "return 0;" schreiben. Das return wird in der Praxis nicht erreicht und daher vom Optimizer rausgeworfen, aber Du hast der vorgeschriebenen Syntax genüge getan. > make: *** No rule to make target `foo.o', needed by `main.elf'. Stop. Nun, wenn Du in Deinem Makefile mal nach "foo" gesucht hättest, solltest Du das selbst sehen. Da steht noch ein "foo.c" und ein "bar.c" als Beispiel für mögliche weitere Quelldateinamen drin. Wirf's raus. (Da das sehr viele Leute nicht geschnallt haben, wird Eric das wohl in der nächsten WinAVR-Version wieder rausnehmen.)
vielen dank für die ausfürliche erklärung. nun klappt alles mit freundlichen grüssen tronic
Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.