Aide a la compilation d'un programme C mal ecrit...

Aide a la compilation d'un programme C mal ecrit... - C - Programmation

Marsh Posté le 06-12-2005 à 14:48:11    

Bonjour,
Voila, j'ai recuperer du code C ecrit de facon tres bizzard, que je ne sais pas compiler.
Sur une dizaine de fichier differents, il n'y a qu'un fichier .c contenant l'executacble, et les autres fichiers (qui sont .h) contiennent directement le code en fin de fichier des fonctions declarées (c'est pas tres beau), de plus il n'y a aucun #include dans ces fichiers .h (pas meme stdio pour le fichier gerant les entrées sorties).
 
Quelqu'un pourrait-il m'aider a compiler ces fichiers sans avoir a les reorganiser selon l'architecture classique (un fichier .c pour chaque fichier .h)? et de facon a ce que toutes les librairies appelées soient bien retrouvé (lib standard ou fichier .h fournis) sans rajouter explicitement le #include approprié dans chaque fichier?
 
Je n'est pas trouver de site internet sur la compilation qui parle de ce genre de fichier.
Je signal que j'avais pas mal de bases de compilation C il y a quelques années... ca n'est pas si loin que ca, mais j'ai besoin d'un coup de pouce pour me remmettre dans le bain.
 
Merci d'avance
 
PS:J'utilise gcc sous linux.
PS2: le programme est censé pouvoir compiler et marcher corretement sans modification d'aucun fichier.

Reply

Marsh Posté le 06-12-2005 à 14:48:11   

Reply

Marsh Posté le 06-12-2005 à 16:27:38    

dentan a écrit :

Voila, j'ai recuperer du code C ecrit de facon tres bizzard, que je ne sais pas compiler.
Sur une dizaine de fichier differents, il n'y a qu'un fichier .c contenant l'executacble, et les autres fichiers (qui sont .h) contiennent directement le code en fin de fichier des fonctions declarées (c'est pas tres beau), de plus il n'y a aucun #include dans ces fichiers .h (pas meme stdio pour le fichier gerant les entrées sorties).
 
Quelqu'un pourrait-il m'aider a compiler ces fichiers sans avoir a les reorganiser selon l'architecture classique (un fichier .c pour chaque fichier .h)? et de facon a ce que toutes les librairies appelées soient bien retrouvé (lib standard ou fichier .h fournis) sans rajouter explicitement le #include approprié dans chaque fichier?
 
Je n'est pas trouver de site internet sur la compilation qui parle de ce genre de fichier.
Je signal que j'avais pas mal de bases de compilation C il y a quelques années... ca n'est pas si loin que ca, mais j'ai besoin d'un coup de pouce pour me remmettre dans le bain.


Tu as perdu le Makefile ?
 
Donne une URL qu'on puisse télécharger le paquet...


---------------
Des infos sur la programmation et le langage C: http://www.bien-programmer.fr Pas de Wi-Fi à la maison : http://www.cpl-france.org/
Reply

Marsh Posté le 06-12-2005 à 17:58:02    

Oui un URL nous aiderait à mieux comprendre la situation.

Reply

Marsh Posté le 06-12-2005 à 20:32:00    

Merci pour votre interet.
Voici les sources que j'essai de compiler:
http://fortinj.free.fr/progen/
Petite precision: je ne sais pas sous quel environnement ca a ete creé. Pas de Make file non plus.
 
J'ai essayer cet apres midi de faire une architecture de projet comme on m'a apris a l'ecole, avec un fichier .c avec le corps des fonction et les headers pour chaque .h etc, et visiblementcertaines fonctions appelées ne sont implémentées nul part.
genre "WriteCostsToFile", "FreeTree". Les trouve-t-on dans une bibliotheque standar???
(Le simple serait quand meme de pouvoir compiler les fichier tels quels...)
Merci pour vos suggestions

Message cité 1 fois
Message édité par dentan le 06-12-2005 à 20:33:49
Reply

Marsh Posté le 06-12-2005 à 20:48:41    

:??:     :??:     :??:  
ca se compile tres tres bien !! sans meme un warning , de la maniere la plus naturelle du monde...
 
on t'as pas appris a compiler un fichier C a l'ecole ?!?
 
 
ps: t'as quant meme pas voulu compiler les headers ??

Message cité 1 fois
Message édité par notornis le 06-12-2005 à 20:52:10
Reply

Marsh Posté le 06-12-2005 à 20:58:25    

dentan a écrit :


Voici les sources que j'essai de compiler:
(Le simple serait quand meme de pouvoir compiler les fichier tels quels...)


Soit. Terrifiant :  


Project   : Progen
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\dev\forums\progen\cb\
--------------------------------------------------------------------------------
Switching to target: default
Compiling: ..\progen.c
In file included from ..\progen.c:24:
..\/utility.h: In function `AllocThreeDIntArray':
..\/utility.h:280: warning: unused variable `j'
..\/utility.h: At top level:
..\/utility.h:308: warning: no previous prototype for 'FreeTree'
..\/utility.h: In function `FreeTree':
..\/utility.h:309: warning: unused variable `j'
..\/utility.h: In function `GenModes':
..\/utility.h:475: warning: comparing floating point with == or != is unsafe
..\/utility.h:473: warning: unused variable `NoOfJobsubsets'
..\/utility.h: In function `GenSetup':
..\/utility.h:626: warning: unused variable `p'
..\/utility.h:626: warning: unused variable `q'
In file included from ..\progen.c:25:
..\/inout.h: In function `GetBaseData':
..\/inout.h:68: warning: passing arg 3 of `strncpy' as unsigned due to prototype
..\/inout.h:97: warning: cast does not match function type
..\/inout.h:98: warning: cast does not match function type
..\/inout.h:99: warning: cast does not match function type
..\/inout.h:101: warning: cast does not match function type
..\/inout.h:103: warning: cast does not match function type
..\/inout.h:104: warning: cast does not match function type
..\/inout.h:107: warning: cast does not match function type
..\/inout.h:108: warning: cast does not match function type
..\/inout.h:114: warning: cast does not match function type
..\/inout.h:115: warning: cast does not match function type
..\/inout.h:116: warning: cast does not match function type
..\/inout.h:117: warning: cast does not match function type
..\/inout.h:118: warning: cast does not match function type
..\/inout.h:119: warning: cast does not match function type
..\/inout.h:125: warning: cast does not match function type
..\/inout.h:126: warning: cast does not match function type
..\/inout.h:127: warning: cast does not match function type
..\/inout.h:128: warning: cast does not match function type
..\/inout.h:129: warning: cast does not match function type
..\/inout.h:130: warning: cast does not match function type
..\/inout.h:133: warning: cast does not match function type
..\/inout.h:138: warning: cast does not match function type
..\/inout.h:139: warning: cast does not match function type
..\/inout.h:140: warning: cast does not match function type
..\/inout.h:141: warning: cast does not match function type
..\/inout.h:142: warning: cast does not match function type
..\/inout.h:143: warning: cast does not match function type
..\/inout.h:146: warning: cast does not match function type
..\/inout.h:185: warning: cast does not match function type
..\/inout.h: At top level:
..\/inout.h:473: warning: no previous prototype for 'WriteCostsToFile'
..\/inout.h: In function `WriteTimeLagsToFile':
..\/inout.h:504: warning: unused variable `i'
In file included from ..\progen.c:26:
..\/availgen.h: In function `MinRenUse':
..\/availgen.h:154: warning: passing arg 4 of `ResReq' with different width due to prototype
..\/availgen.h:154: warning: passing arg 4 of `ResReq' with different width due to prototype
..\/availgen.h: In function `MaxRenUse':
..\/availgen.h:223: warning: passing arg 4 of `ResReq' with different width due to prototype
..\/availgen.h: In function `MaxNonRenCon':
..\/availgen.h:250: warning: passing arg 4 of `ResReq' with different width due to prototype
..\/availgen.h:250: warning: passing arg 4 of `ResReq' with different width due to prototype
..\/availgen.h: In function `MinNonRenCon':
..\/availgen.h:273: warning: passing arg 4 of `ResReq' with different width due to prototype
..\/availgen.h:273: warning: passing arg 4 of `ResReq' with different width due to prototype
..\/availgen.h: In function `CalcResCapacities':
..\/availgen.h:379: warning: passing arg 2 of `MinRenUse' with different width due to prototype
..\/availgen.h:379: warning: passing arg 2 of `MaxRenUse' with different width due to prototype
..\/availgen.h:382: warning: passing arg 2 of `MinNonRenCon' with different width due to prototype
..\/availgen.h:382: warning: passing arg 2 of `MaxNonRenCon' with different width due to prototype
..\/availgen.h:386: warning: passing arg 2 of `MinRenUse' with different width due to prototype
..\/availgen.h:386: warning: passing arg 2 of `MaxRenUse' with different width due to prototype
..\/availgen.h:388: warning: passing arg 2 of `MinNonRenCon' with different width due to prototype
..\/availgen.h:388: warning: passing arg 2 of `MaxNonRenCon' with different width due to prototype
In file included from ..\progen.c:27:
..\/netwgen.h: In function `ArcIsRedundant':
..\/netwgen.h:52: warning: unused variable `l'
In file included from ..\progen.c:28:
..\/reqgen.h: In function `ChooseResFunc':
..\/reqgen.h:366: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:370: warning: passing arg 1 of `ResFuncProb' with different width due to prototype
..\/reqgen.h:374: warning: passing arg 1 of `ResFuncProb' with different width due to prototype
..\/reqgen.h: In function `TestResDens':
..\/reqgen.h:402: warning: passing arg 1 of `ResFac' with different width due to prototype
..\/reqgen.h:402: warning: passing arg 1 of `MinResUsed' with different width due to prototype
..\/reqgen.h:402: warning: cast does not match function type
..\/reqgen.h:403: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:403: warning: cast does not match function type
..\/reqgen.h:404: warning: passing arg 2 of `ErrorNumber' with different width due to prototype
..\/reqgen.h:405: warning: passing arg 1 of `ResFac' with different width due to prototype
..\/reqgen.h:405: warning: passing arg 1 of `MaxResUsed' with different width due to prototype
..\/reqgen.h:405: warning: cast does not match function type
..\/reqgen.h:406: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:406: warning: cast does not match function type
..\/reqgen.h:407: warning: passing arg 2 of `ErrorNumber' with different width due to prototype
..\/reqgen.h: In function `InitResDens':
..\/reqgen.h:423: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h: In function `SetMinResDens':
..\/reqgen.h:442: warning: passing arg 1 of `MinResUsed' with different width due to prototype
..\/reqgen.h:444: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h: In function `NoReqRes':
..\/reqgen.h:467: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h: In function `Determine':
..\/reqgen.h:492: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:494: warning: passing arg 3 of `NoReqRes' with different width due to prototype
..\/reqgen.h:495: warning: passing arg 1 of `MaxResUsed' with different width due to prototype
..\/reqgen.h: In function `SetResDens':
..\/reqgen.h:526: warning: passing arg 1 of `MinResUsed' with different width due to prototype
..\/reqgen.h:526: warning: cast does not match function type
..\/reqgen.h:527: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:527: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:530: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:531: warning: passing arg 1 of `MinResUsed' with different width due to prototype
..\/reqgen.h:532: warning: passing arg 1 of `ResFac' with different width due to prototype
..\/reqgen.h:535: warning: passing arg 2 of `Determine' with different width due to prototype
..\/reqgen.h:538: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:540: warning: passing arg 1 of `ResFac' with different width due to prototype
..\/reqgen.h:541: warning: passing arg 2 of `ErrorNumber' with different width due to prototype
..\/reqgen.h:542: warning: passing arg 1 of `ResFac' with different width due to prototype
..\/reqgen.h:543: warning: passing arg 2 of `ErrorNumber' with different width due to prototype
..\/reqgen.h:520: warning: unused variable `m'
..\/reqgen.h:521: warning: unused variable `r'
..\/reqgen.h: In function `GenResDens':
..\/reqgen.h:558: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:559: warning: passing arg 1 of `TestResDens' with different width due to prototype
..\/reqgen.h:562: warning: passing arg 2 of `InitResDens' with different width due to prototype
..\/reqgen.h:563: warning: passing arg 2 of `SetMinResDens' with different width due to prototype
..\/reqgen.h:565: warning: passing arg 1 of `SetResDens' with different width due to prototype
..\/reqgen.h: In function `InitReq':
..\/reqgen.h:606: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:607: warning: passing arg 5 of `WriteResReq' with different width due to prototype
..\/reqgen.h: In function `ReqAm':
..\/reqgen.h:668: warning: passing arg 1 of `ResFunc' with different width due to prototype
..\/reqgen.h:672: warning: passing arg 1 of `MinResReq' with different width due to prototype
..\/reqgen.h:672: warning: passing arg 1 of `MaxResReq' with different width due to prototype
..\/reqgen.h:675: warning: passing arg 5 of `WriteResReq' with different width due to prototype
..\/reqgen.h:679: warning: passing arg 1 of `MinResReq' with different width due to prototype
..\/reqgen.h:679: warning: passing arg 1 of `MaxResReq' with different width due to prototype
..\/reqgen.h:680: warning: passing arg 1 of `MinResReq' with different width due to prototype
..\/reqgen.h:680: warning: passing arg 1 of `MaxResReq' with different width due to prototype
..\/reqgen.h:682: warning: passing arg 1 of `MinResReq' with different width due to prototype
..\/reqgen.h:682: warning: passing arg 1 of `MaxResReq' with different width due to prototype
..\/reqgen.h:693: warning: passing arg 5 of `WriteResReq' with different width due to prototype
..\/reqgen.h: In function `ResTypeEff':
..\/reqgen.h:727: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:728: warning: passing arg 4 of `PerReq' with different width due to prototype
..\/reqgen.h:729: warning: passing arg 4 of `PerReq' with different width due to prototype
..\/reqgen.h: In function `Efficiency':
..\/reqgen.h:753: warning: passing arg 6 of `ResTypeEff' with different width due to prototype
..\/reqgen.h:755: warning: passing arg 6 of `ResTypeEff' with different width due to prototype
..\/reqgen.h:757: warning: passing arg 6 of `ResTypeEff' with different width due to prototype
..\/reqgen.h:759: warning: passing arg 6 of `ResTypeEff' with different width due to prototype
..\/reqgen.h: In function `ResReqSub':
..\/reqgen.h:786: warning: passing arg 1 of `GenResDens' with different width due to prototype
..\/reqgen.h:789: warning: passing arg 2 of `InitReq' with different width due to prototype
..\/reqgen.h:790: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:791: warning: passing arg 3 of `ReqAm' with different width due to prototype
..\/reqgen.h:784: warning: unused variable `a'
..\/reqgen.h: In function `AssNewDens':
..\/reqgen.h:815: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:816: warning: passing arg 4 of `PerReq' with different width due to prototype
..\/reqgen.h:818: warning: passing arg 2 of `InitResDens' with different width due to prototype
..\/reqgen.h:819: warning: passing arg 2 of `SetMinResDens' with different width due to prototype
..\/reqgen.h:821: warning: passing arg 1 of `MinResUsed' with different width due to prototype
..\/reqgen.h:828: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:830: warning: passing arg 3 of `NoReqRes' with different width due to prototype
..\/reqgen.h:831: warning: passing arg 1 of `MaxResUsed' with different width due to prototype
..\/reqgen.h: In function `AssNewReq':
..\/reqgen.h:857: warning: passing arg 2 of `InitReq' with different width due to prototype
..\/reqgen.h:858: warning: passing arg 1 of `NumRes' with different width due to prototype
..\/reqgen.h:859: warning: passing arg 3 of `ReqAm' with different width due to prototype
..\/reqgen.h: In function `TestEfficiency':
..\/reqgen.h:881: warning: passing arg 2 of `AssNewDens' with different width due to prototype
..\/reqgen.h:882: warning: passing arg 2 of `AssNewReq' with different width due to prototype
..\/reqgen.h:883: warning: passing arg 2 of `AssNewDens' with different width due to prototype
..\/reqgen.h:884: warning: passing arg 2 of `AssNewReq' with different width due to prototype
..\/reqgen.h:885: warning: passing arg 2 of `AssNewDens' with different width due to prototype
..\/reqgen.h:886: warning: passing arg 2 of `AssNewReq' with different width due to prototype
..\/reqgen.h:887: warning: passing arg 2 of `AssNewDens' with different width due to prototype
..\/reqgen.h:888: warning: passing arg 2 of `AssNewReq' with different width due to prototype
..\/reqgen.h:893: warning: passing arg 2 of `AssNewDens' with different width due to prototype
..\/reqgen.h:894: warning: passing arg 2 of `AssNewReq' with different width due to prototype
..\/reqgen.h:895: warning: passing arg 2 of `AssNewDens' with different width due to prototype
..\/reqgen.h:896: warning: passing arg 2 of `AssNewReq' with different width due to prototype
..\/reqgen.h:897: warning: passing arg 2 of `AssNewDens' with different width due to prototype
..\/reqgen.h:898: warning: passing arg 2 of `AssNewReq' with different width due to prototype
..\/reqgen.h:899: warning: passing arg 2 of `AssNewDens' with different width due to prototype
..\/reqgen.h:900: warning: passing arg 2 of `AssNewReq' with different width due to prototype
..\/reqgen.h: In function `CalcResReqs':
..\/reqgen.h:943: warning: passing arg 1 of `ChooseResFunc' with different width due to prototype
..\/reqgen.h:944: warning: passing arg 1 of `ResReqSub' with different width due to prototype
..\/reqgen.h:946: warning: passing arg 1 of `ChooseResFunc' with different width due to prototype
..\/reqgen.h:947: warning: passing arg 1 of `ResReqSub' with different width due to prototype
..\/reqgen.h:949: warning: passing arg 1 of `ChooseResFunc' with different width due to prototype
..\/reqgen.h:950: warning: passing arg 1 of `ResReqSub' with different width due to prototype
..\/reqgen.h:952: warning: passing arg 1 of `ChooseResFunc' with different width due to prototype
..\/reqgen.h:953: warning: passing arg 1 of `ResReqSub' with different width due to prototype
..\progen.c: In function `ShowMenue':
..\progen.c:228: warning: int format, long int arg (arg 2)
..\/availgen.h: In function `ResReq':
..\/availgen.h:39: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `NumRes':
..\/reqgen.h:71: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `MinResReq':
..\/reqgen.h:100: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `MaxResReq':
..\/reqgen.h:129: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `MinResUsed':
..\/reqgen.h:158: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `MaxResUsed':
..\/reqgen.h:187: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `ResFac':
..\/reqgen.h:216: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `ResFunc':
..\/reqgen.h:245: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `ResFuncProb':
..\/reqgen.h:274: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `ErrorNumber':
..\/reqgen.h:302: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `PerReq':
..\/reqgen.h:331: warning: 'Result' might be used uninitialized in this function
..\/reqgen.h: In function `Determine':
..\/reqgen.h:483: warning: 'jchosen' might be used uninitialized in this function
..\progen.c: In function `GenProj':
..\progen.c:106: warning: 'PerSub' might be used uninitialized in this function
Linking console executable: C:\dev\forums\progen\cb\progen.exe
Process terminated with status 0 (0 minutes, 5 seconds)
0 errors, 171 warnings


Ce code ne peut pas fonctionner. Trop d'erreurs de codage.
 
Je lance, je fais '5' -> crash !
 
Normal :  


                case '5':
                 
                /* -ed- ajoute protections */
                if (SI != NULL)
                {
                    if (SI->B != NULL)
                    {
                        free (SI->B->RFuncProb);
                        free (SI->B->DFuncProb);
                        free (SI->B->NFuncProb);
                        free (SI->B->PFuncProb);
                    }
                    free(SI->B);
                }
                free(SI);


En XP (eXtrem Programming), on parlerait poliment de 'refactoring'...
 
Voilà, c'est fait (et ça plante gravement si on fait '4'...)
 
http://delahaye.emmanuel.free.fr/progen/
 
C'est un gestionnaire de projet ?


Message édité par Emmanuel Delahaye le 07-12-2005 à 00:14:41

---------------
Des infos sur la programmation et le langage C: http://www.bien-programmer.fr Pas de Wi-Fi à la maison : http://www.cpl-france.org/
Reply

Marsh Posté le 06-12-2005 à 21:03:34    

OMG [:banditsuzukixp]  
 
"warning: comparing floating point with == or != is unsafe"
OOOOUTCH. "Bonjour, je suis un test qui ne demande qu'à ne pas fonctionner comme prévu"
 
 
 
Et puis la longue liste des warnings sur les cast/incompatibilités de types me fait peur.  
Ca me fait penser à une énorme usine à gaz prête à tomber en morceaux.
 
 
A abandonner. D'urgence.

Reply

Marsh Posté le 06-12-2005 à 21:05:52    

effectivement , c fait a la barbare.
 
ca sent le projet etudiant recupéré a plein nez !!

Reply

Marsh Posté le 06-12-2005 à 21:35:48    

notornis a écrit :

effectivement , c fait a la barbare.
 
ca sent le projet etudiant recupéré a plein nez !!


Ah bon ? Je croyais que ca se compilait tres bien et sans warnings.

Reply

Marsh Posté le 06-12-2005 à 21:38:13    

notornis a écrit :

:??:     :??:     :??:  
ca se compile tres tres bien !! sans meme un warning , de la maniere la plus naturelle du monde...
 
on t'as pas appris a compiler un fichier C a l'ecole ?!?
 
 
ps: t'as quant meme pas voulu compiler les headers ??


notornis a écrit :

effectivement , c fait a la barbare.
 
ca sent le projet etudiant recupéré a plein nez !!


 [:the_fury]


---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
Reply

Marsh Posté le 06-12-2005 à 21:38:13   

Reply

Marsh Posté le 06-12-2005 à 21:55:36    

matafan a écrit :

Ah bon ? Je croyais que ca se compilait tres bien et sans warnings.


et alors ?? l'un n'empeche pas l'autre  :heink:  
 
$ gcc -o truc progen.c
$
ca me parrait simple , non ?
j'ai meme pas un warning chez moi.
 

Reply

Marsh Posté le 06-12-2005 à 21:56:38    

c'est un programme développé sous linux ?


---------------
J'ai un string dans l'array (Paris Hilton)
Reply

Marsh Posté le 06-12-2005 à 21:57:06    

notornis a écrit :

et alors ?? l'un n'empeche pas l'autre  :heink:  
 
$ gcc -o truc progen.c
$
ca me parrait simple , non ?
j'ai meme pas un warning chez moi.


essaie avec -Wall, ça marchera mieux [:petrus75]


---------------
J'ai un string dans l'array (Paris Hilton)
Reply

Marsh Posté le 06-12-2005 à 22:01:54    

Harkonnen a écrit :

essaie avec -Wall, ça marchera mieux [:petrus75]


non !!!!!!!!!!   sans deconner !!!   :ouch:  
 
tu veux pas non plus que je fasse un makefile, definisse des FLAGS et tout et tout juste pour tester son machin...

Reply

Marsh Posté le 06-12-2005 à 22:04:16    

notornis a écrit :

non !!!!!!!!!!   sans deconner !!!   :ouch:  
 
tu veux pas non plus que je fasse un makefile, definisse des FLAGS et tout et tout juste pour tester son machin...


 
utiliser un -Wall c'est quand même le minimum à faire quand on compile hein [:spamafote]


---------------
Me: Django Localization, Yogo Puzzle, Chrome Grapher, C++ Signals, Brainf*ck.
Reply

Marsh Posté le 06-12-2005 à 22:08:36    

0x90 a écrit :

utiliser un -Wall c'est quand même le minimum à faire quand on compile hein [:spamafote]


+10000, surtout en C


Message édité par Harkonnen le 06-12-2005 à 22:08:50
Reply

Marsh Posté le 06-12-2005 à 22:10:20    

0x90 a écrit :

utiliser un -Wall c'est quand même le minimum à faire quand on compile hein [:spamafote]


 :jap:  
 
je comprends bien, mais la ... aucune importance
moi, je voulais juste compiler le soi-disant projet C bizarre, incompilable. [:spamafote]


Message édité par notornis le 06-12-2005 à 22:10:55
Reply

Marsh Posté le 06-12-2005 à 22:18:46    

notornis a écrit :

non !!!!!!!!!!   sans deconner !!!   :ouch:  
 
tu veux pas non plus que je fasse un makefile, definisse des FLAGS et tout et tout juste pour tester son machin...


alias gcc='gcc -Wall'
[:petrus75]


---------------
Stick a parrot in a Call of Duty lobby, and you're gonna get a racist parrot. — Cody
Reply

Marsh Posté le 07-12-2005 à 00:39:57    

Ok, merci.
J'avais donc reussi a compiler correctement, mais en voyant tous ces warning, et que j'avais jamais vu du code dans un fichier .h (et que j'avais des segmentation fault a l'execution), je pensais que j'avais un probleme d'edition des liens.
Bon, ca marchera donc jamais sur ma machine...
 
Pour l'histoire, j'ai le meme programme ecrit en pascal, qui marche tres bien, sauf pour de grosses données (le compilateur me previent d'un probleme de place si je met une des constantes du programme un peu trop grande)...
Mais la par contre je connais pas du tout le langage, j'vais essayer de comprendre un peu et demander sur le post ada si je trouve pas pourquoi.

Reply

Marsh Posté le 07-12-2005 à 06:43:27    

dentan a écrit :

Bon, ca marchera donc jamais sur ma machine...


 [:aloy]  
 
 

dentan a écrit :

Mais la par contre je connais pas du tout le langage, j'vais essayer de comprendre un peu et demander sur le post ada si je trouve pas pourquoi.


Non mais laisse tomber ce programme, il est si mal foutu que tu vas te triturer les neurones pour rien.
A ce stade, il vaut mieux le laisser tomber ce machin.

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed