"je pouvais lancer le programme dans le dossier bin mais pas a aprtir de l'IDE, donc je me suis dit que code block etait de la merde comme dans mes souvenirs"
Mouais, ça me semble un peu expéditif comme jugement, et peut-être que c'est possible, mais que tu n'a pas trouvé.
Encore une fois, le but est d'utiliser un outils adapté à ses besoin et dont l'on sait se servir, mais ça ne doit pas pour autant empecher d'évoluer vers des outils évoluer quand ça devient nécessaire, mais s'il faut pour cela un petit temps d'adaptation.
chrono--trigger tu peux me dire la solution de ton problème ?
C'est pas parce que tu sais pas te servir d'un logiciel que c'est de la merde ![]()
Yop, pas d'anciennes versions (désolé du retard :s) et tout me semble correct. Une solution
?
Merci d'avance
.
Bon j'vais essayer a partir des packages "DevPak", au fait il y aurait pas FMOD en .devpak? Merci d'avance ![]()
-lSDL_ttf ajouté dans le linker, byzarre ![]()
Désolé du quadruple post mais là j'ai quelque chose de nouveau
.
J'ai plus la même erreur, ça compile et foire:
"Compilateur: Default compiler
Building Makefile: "C:\Dev-Cpp\Makefile.win"
Exécution de make...
make.exe -f "C:\Dev-Cpp\Makefile.win" all
gcc.exe -D__DEBUG__ -c testsdl.c -o Project/testsdl.o -I"C:/Dev-Cpp/include" -ansi -traditional-cpp -g3
In file included from C:/Dev-Cpp/include/SDL/SDL_stdinc.h:137,
from C:/Dev-Cpp/include/SDL/SDL_main.h:26,
from C:/Dev-Cpp/include/SDL/SDL.h:28,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_main.h:59,
from C:/Dev-Cpp/include/SDL/SDL.h:28,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_error.h:30,
from C:/Dev-Cpp/include/SDL/SDL_audio.h:29,
from C:/Dev-Cpp/include/SDL/SDL.h:30,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_endian.h:47,
from C:/Dev-Cpp/include/SDL/SDL_audio.h:30,
from C:/Dev-Cpp/include/SDL/SDL.h:30,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_mutex.h:34,
from C:/Dev-Cpp/include/SDL/SDL_audio.h:31,
from C:/Dev-Cpp/include/SDL/SDL.h:30,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_thread.h:37,
from C:/Dev-Cpp/include/SDL/SDL_audio.h:32,
from C:/Dev-Cpp/include/SDL/SDL.h:30,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_rwops.h:33,
from C:/Dev-Cpp/include/SDL/SDL_audio.h:33,
from C:/Dev-Cpp/include/SDL/SDL.h:30,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_audio.h:35,
from C:/Dev-Cpp/include/SDL/SDL.h:30,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_cdrom.h:31,
from C:/Dev-Cpp/include/SDL/SDL.h:31,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_cpuinfo.h:31,
from C:/Dev-Cpp/include/SDL/SDL.h:32,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_active.h:31,
from C:/Dev-Cpp/include/SDL/SDL_events.h:30,
from C:/Dev-Cpp/include/SDL/SDL.h:35,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_keyboard.h:32,
from C:/Dev-Cpp/include/SDL/SDL_events.h:31,
from C:/Dev-Cpp/include/SDL/SDL.h:35,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_video.h:32,
from C:/Dev-Cpp/include/SDL/SDL_mouse.h:30,
from C:/Dev-Cpp/include/SDL/SDL_events.h:32,
from C:/Dev-Cpp/include/SDL/SDL.h:35,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_mouse.h:32,
from C:/Dev-Cpp/include/SDL/SDL_events.h:32,
from C:/Dev-Cpp/include/SDL/SDL.h:35,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_joystick.h:31,
from C:/Dev-Cpp/include/SDL/SDL_events.h:33,
from C:/Dev-Cpp/include/SDL/SDL.h:35,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_events.h:36,
from C:/Dev-Cpp/include/SDL/SDL.h:35,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_loadso.h:47,
from C:/Dev-Cpp/include/SDL/SDL.h:36,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_timer.h:31,
from C:/Dev-Cpp/include/SDL/SDL.h:40,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_version.h:30,
from C:/Dev-Cpp/include/SDL/SDL.h:42,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL.h:44,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/begin_code.h:94: warning: extra tokens at end of #endif directive
In file included from C:/Dev-Cpp/include/SDL/SDL_main.h:26,
from C:/Dev-Cpp/include/SDL/SDL.h:28,
from testsdl.c:3:
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:109: error: syntax error at '##' token
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:109: error: syntax error before "uint8"
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:109: warning: data definition has no type or storage class
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:110: error: syntax error at '##' token
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:110: error: syntax error before "sint8"
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:110: warning: data definition has no type or storage class
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:111: error: syntax error at '##' token
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:111: error: syntax error before "uint16"
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:111: warning: data definition has no type or storage class
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:112: error: syntax error at '##' token
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:112: error: syntax error before "sint16"
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:112: warning: data definition has no type or storage class
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:113: error: syntax error at '##' token
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:113: error: syntax error before "uint32"
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:113: warning: data definition has no type or storage class
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:114: error: syntax error at '##' token
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:114: error: syntax error before "sint32"
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:114: warning: data definition has no type or storage class
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:115: error: syntax error at '##' token
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:115: error: syntax error before "uint64"
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:115: warning: data definition has no type or storage class
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:116: error: syntax error at '##' token
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:116: error: syntax error before "sint64"
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:116: warning: data definition has no type or storage class
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:133: error: syntax error at '##' token
C:/Dev-Cpp/include/SDL/SDL_stdinc.h:133: error: syntax error before "enum"
make.exe: *** [Project/testsdl.o] Error 1
Exécution terminée"
Donc, ça repère les lib mais ne compile pas
... Enfin bon.
Ca avance ![]()
Merci d'avance ![]()
La compilation se fait avant l'édition de lien, donc ça ne dit pas que ton autre problème est corrigé. Typiquement l'erreur que tu as là est du à un point virgule oublié dans un de tes fichiers sources par exemple (soit dans testdl.c vers le tout début du fichier, soit dans un autre fichier que tu inclu avant d'inclure SDL.h), ou alors tu fait un define que SDL.h n'aime pas ou quelque chose dans ce genre.
...
Il te suffit de voir le premier lien pour voir que je n'ai rien fait de tout ça.
Une autre personne, peut-être ?
Si c'est comme ça que tu répond à ceux qui prenne du temps pour t'aider, tu peux aussi bien aller voir ailleurs si on y est.
Eh bien, je ne te critique pas, je pense que je vais finalement changer d'EDI. A la prochaine.
malgré tout, vérifie les caractères qui pourrait trainer au début de ton fichier. Et entre la précédente compilation et celle-ci, tu as rajoutté l'option "-ansi" à ton compilateur, ce que SDL n'aime peut-être pas (et ça pourrait être la cause de ces erreurs).
J'ai essayé avec un code totalement identique mais j'ai changé certaines choses mais cela ne marche pas non plus :
Code :
int main( int argc, char *argv[ ] )
{
SDL_Surface *screen;
if(SDL_Init( SDL_INIT_VIDEO ) < 0 )
{
printf("Impossible d'initialiser SDL: %s\n", SDL_GetError( ));
exit(1);
}
atexit( SDL_Quit );
screen = SDL_SetVideoMode(640, 480, 16, SDL_HWSURFACE);
if(screen == NULL)
{
printf( "Impossible d'initialiser le mode vidéo: %s\n", SDL_GetError( ) );
exit(1);
}
SDL_Delay(3000);
return 0;
}
Je ne comprends pas ce que tu veux dire avec les caractères au début.
J'ai recompilé sans le support C ANSI mais ca m'affichait toutes les mêmes erreurs.
Merci de continuer à m'aider et de l'attention que tu portes sur mon problème depuis le début =)
mmm, ce dernier code compile parfaitement chez moi.
Quel est le message renvoyé par ton compilateur ?
Quel est la version de gcc utilisé ?
Il y a des version différentes de la lib SDL en fonction du compilateur. As tu pris la bonne ?
Je porte la poisse !
Voici le log de compilation sur pastebin:
http://pastebin.com/m36ada7e0
Mingw tu veux dire ? J'ai Mingw 5.1.4.
Dans Dev C++ on a un "package manager" qui permet d'installer directement les libs. J'ai pris SDL 1.2.12.
J'avais fait l'installation manuelle au départ et puis ça ne marchait pas donc j'ai pris les DevPak (http://devpaks.org/) avec le package manager de dev-cpp.
Donc je sais pas si cette version est adaptée à mingw mais bon...
Merci d'avance ![]()
Il y a aussi cette option "-traditionnal-cpp" qui est activé lors de la compilation et que je ne connais pas, mais qui pourrait désactiver le support du compilo pour certaines extension du préprocesseur qu'utilise SDL.
Désolé ça je sais pas comment enlever :/
Je n'en sais rien, mais ça aussi, c'est un truc qui n'était pas dans ton premier log de compilation et c'est donc probablement aussi une option que tu as coché dans dev c++ (mais je ne sais pas trop où, je ne m'en sers plus depuis longtemps). Ou alors c'est activé automatiquement par l'installation différente, mais ça me semble étrange.
Ou alors... Je pourrais essayer de compiler moi-même via la ligne de commande sans le "-traditionnal-cpp" ![]()