Rob.Anfänger
05.02.2007, 14:54
Hallo,
Das folgende Program müsste eigentlich den Tastenwert am Computer ausgeben, aber jedesmal kommt beim Compilieren eine Fehlermeldung:
Programm:
#include "asuro.h"
int main(void)
{
Init();
while(1)
{
PrintInt(PollSwitch());
}
return 0;
}
Fehlermeldung:
C:\Dokumente und Einstellungen\Lieret\Desktop\Kilian\ASURO\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.
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:8: warning: implicit declaration of function `PrintInt' avr-gcc -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.o test.o asuro.o --output test.elf -Wl,-Map=test.map,--cref -lm
test.o(.text+0xe): In function `main':
C:\Dokumente und Einstellungen\Lieret\Desktop\Kilian\ASURO\FirstTry/test.c:8: undefined reference to `PrintInt'make: *** [test.elf] Error 1
> Process Exit Code: 2
Was habe ich falsch gemacht?
Das folgende Program müsste eigentlich den Tastenwert am Computer ausgeben, aber jedesmal kommt beim Compilieren eine Fehlermeldung:
Programm:
#include "asuro.h"
int main(void)
{
Init();
while(1)
{
PrintInt(PollSwitch());
}
return 0;
}
Fehlermeldung:
C:\Dokumente und Einstellungen\Lieret\Desktop\Kilian\ASURO\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.
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:8: warning: implicit declaration of function `PrintInt' avr-gcc -mmcu=atmega8 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-ahlms=test.o test.o asuro.o --output test.elf -Wl,-Map=test.map,--cref -lm
test.o(.text+0xe): In function `main':
C:\Dokumente und Einstellungen\Lieret\Desktop\Kilian\ASURO\FirstTry/test.c:8: undefined reference to `PrintInt'make: *** [test.elf] Error 1
> Process Exit Code: 2
Was habe ich falsch gemacht?