Wo liegt der Fehler?

Gast #650854
Lesenswert?

Hallo,
bin Programmieranfänger und hab Probleme einen Fehler zu finden.
Hab ein Programm verändert (weiß aber leider nicht mehr was alles) und 
beim kompilieren wird mir folgende Fehlermeldung geliefert:

avr-gcc -c -mmcu=at90can128 -I. -gstabs   -Os -funsigned-char 
-funsigned-bitfields -fpack-struct -fshort-enums -Wall 
-Wstrict-prototypes -Wa,-adhlns=main.lst  -std=gnu99 
-Wp,-M,-MP,-MT,main.o,-MF,.dep/main.o.d main.c -o main.o
In file included from 
c:/winavr-20070525/bin/../avr/include/inttypes.h:37,
                 from 
c:/winavr-20070525/bin/../avr/include/avr/sfr_defs.h:126,
                 from c:/winavr-20070525/bin/../avr/include/avr/io.h:87,
                 from main.c:48:
c:/winavr-20070525/bin/../avr/include/stdint.h:121: error: expected '=', 
',', ';', 'asm' or '__attribute__' before 'typedef'
c:/winavr-20070525/bin/../avr/include/stdint.h:159: error: expected '=', 
',', ';', 'asm' or '__attribute__' before 'int_least8_t'
c:/winavr-20070525/bin/../avr/include/stdint.h:213: error: expected '=', 
',', ';', 'asm' or '__attribute__' before 'int_fast8_t'

Hab nur die main geändert. Warum wird ein Fehler in der stdint.h 
angezeigt?
Falls erforderlich kann ich natürlich gerne den Quellcode anhängen.

Gruß,
Ren
Gast #650867
Lesenswert?

hatte oben noch versuchsweise was auskommentiert.
hier die richtige Fehlermeldung:

Compiling: main.c
avr-gcc -c -mmcu=at90can128 -I. -gstabs   -Os -funsigned-char 
-funsigned-bitfields -fpack-struct -fshort-enums -Wall 
-Wstrict-prototypes -Wa,-adhlns=main.lst  -std=gnu99 
-Wp,-M,-MP,-MT,main.o,-MF,.dep/main.o.d main.c -o main.o
In file included from 
c:/winavr-20070525/bin/../avr/include/inttypes.h:37,
                 from main.c:46:
c:/winavr-20070525/bin/../avr/include/stdint.h:121: error: expected '=', 
',', ';', 'asm' or '__attribute__' before 'typedef'
c:/winavr-20070525/bin/../avr/include/stdint.h:159: error: expected '=', 
',', ';', 'asm' or '__attribute__' before 'int_least8_t'
c:/winavr-20070525/bin/../avr/include/stdint.h:213: error: expected '=', 
',', ';', 'asm' or '__attribute__' before 'int_fast8_t'

und Zeile 46-60:

#include <inttypes.h>
#include <avr/delay.h>      /* definiert _delay_ms() ab avr-libc Version 
1.2.0 */
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//#include <stdint.h>
#include <avr/wdt.h>
#include "config.h"
#include "can_lib.h"
#include "can_drv.h"
#include <iocanxx.h>
#include <util/delay.h>     /* in der aktuellen Version in util/ */

alles drüber ist auskommentiert

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren