-
2 piθce(s) jointe(s)
Bugs inconnus insolubles
Bonjour,
Avec un Makefile:
# all
all: list.c
gcc list.c -o list
Je n'arrive pas ΰ debuger ces erreurs:
make -k
gcc list.c -o list
list.c: In function liste:
list.c:8: error: parameter tete is initialized
list.c:16: error: storage class specified for parameter nb_elements
list.c:16: error: parameter nb_elements is initialized
list.c:20: error: expected =, ,, ;, asm or __attribute__ before { token
list.c:37: error: expected =, ,, ;, asm or __attribute__ before { token
list.c:57: error: expected =, ,, ;, asm or __attribute__ before { token
list.c:101: error: expected =, ,, ;, asm or __attribute__ before { token
list.c:143: error: expected =, ,, ;, asm or __attribute__ before { token
list.c:163: error: old-style parameter declarations in prototyped function definition
list.c:163: error: expected { at end of input
make: *** [all] Erreur 1
Pouvez vous m aider?
Merci d'avance
-
Salut,
avant tout, qsq tu veut faire, un binaire ? ( il faut ajouter la fonction main)
si c'est un objet (*.o), alors il tu faut l'option -c avec gcc, comme ηa:
Code:
1 2
|
gcc -c list.c -o list.o |
-
Dans list.h, il manque un ; ΰ la fin
Code:
extern void liste(void);
-
impeccable, avec ces 2 modifs et d'autres simples ΰ corriger , ηa marche,
merci