Bonjour,
bon voila je commence à m'arracher les cheveux![]()
Mon projet de code se compose de 3 fichiers principaux pour l'instant
main.c
cards.c
cards.h
main.c :
Début du cards.h :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 #include <stdio.h> #include <stdlib.h> #include <time.h> #include "cards.h" int main(void) { struct cardgame *newgame ; struct player *newplayer ; Init_Sorted_CardGame(newgame) ; Set_Shuffled_CardGame(newgame) ; Deal_To_Player_Cards(newgame,newplayer,5); system("pause") ; return 0 ; }
Début du cards.c :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 #ifndef CARDS_H #define CARDS_H ... mes prototypes ... #endif
Erreur persistante de compilation :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 #include <stdio.h> #include <stdlib.h> #include <time.h> #include "cards.h"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 Linking console executable: D:\blackjack\blackjack.exe .objs\tmp\cards.o:cards.c:(.data+0x0): multiple definition of `ColorTable' .objs\tmp\main.o:main.c:(.data+0x0): first defined here .objs\tmp\cards.o:cards.c:(.data+0x40): multiple definition of `ValueTable' .objs\tmp\main.o:main.c:(.data+0x40): first defined here collect2: ld returned 1 exit status
Je pige vraiment pas.. mon code marchait pourtant bien avant que je rajoute de nouvelles fonctions proprement..
Merci pour l'aide.
Partager