Deutsch English Français Italiano |
<625e723a$0$22264$426a74cc@news.free.fr> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed3-a.proxad.net!nnrp4-1.free.fr!not-for-mail Newsgroups: fr.comp.sys.mac.programmation X-Mozilla-News-Host: news://news.free.fr:119 From: kurtz le pirate <kurtzlepirate@free.fr> Subject: XCode C99 : duplicate symbol Organization: Compagnie de la Banquise Date: Tue, 19 Apr 2022 10:26:34 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Lines: 44 Message-ID: <625e723a$0$22264$426a74cc@news.free.fr> NNTP-Posting-Date: 19 Apr 2022 10:26:34 CEST NNTP-Posting-Host: 90.107.43.11 X-Trace: 1650356794 news-1.free.fr 22264 90.107.43.11:49582 X-Complaints-To: abuse@proxad.net Bytes: 1913 Bonjour, Si de vieux dinosaures passent par la... Dans mon projet, j'ai ces fichiers : a_structures.h a_toolbox.h a_toolbox.c a_m.h a_m.c main.c Le fichier a_structures.h ne contient que des définitions de structures. Dans main.c j'ai : #include "a_structures.h" #include "a_toolbox.h" #include "a_m.h" J'ai un tableau de chaines : const char * DaysNames[] = { "Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi" }; que j'utilise dans le main.c : printf(" Le 30/6/1954 est un %s (%d)\n", DaysNames[dayofweek], dayofweek); Si le tableau est déclaré dans le main.c pas de problème. Si le tableau est déclaré dans le a_structures.h, le compilateur sort une erreur : duplicate symbol _DaysNames in: /Users/.../main.o /Users/.../a_m.o /Users/.../a_toolbox.o Et la je ne comprends plus... Si vous avez une idée. Merci d'avance. -- kurtz le pirate compagnie de la banquise