salut voila je suis un nouveau en matiere de progamation alors j'aimerai bien que vous m'aidiez
il se trouve que je veux utiliser la bibliotheque SDL et que je n'arrive pas a compiler la source que j'ai telecharger j'utilise Dev-cpp4.9.9.2
#include <stdlib.h> #include <stdio.h> #include "SDL.h" SDL_Surface* affichage; void initSDL(void); void attendreTouche(void); int main(int argc, char** argv) { initSDL(); attendreTouche(); return EXIT_SUCCESS; } void initSDL(void) { if (SDL_Init(SDL_INIT_VIDEO) < 0) { fprintf(stderr, "Erreur à l'initialisation de la SDL : %s\n", SDL_GetError()); exit(EXIT_FAILURE); } atexit(SDL_Quit); affichage = SDL_SetVideoMode(800, 600, 32, SDL_SWSURFACE); if (affichage == NULL) { fprintf(stderr, "Impossible d'activer le mode graphique : %s\n", SDL_GetError()); exit(EXIT_FAILURE); } SDL_WM_SetCaption("Mon premier programme SDL", NULL); } void attendreTouche(void) { SDL_Event event; do SDL_WaitEvent(&event); while (event.type != SDL_QUIT && event.type != SDL_KEYDOWN); } |
le compilateur me pose comme probleme qu'il ya de multiple definition dans"initSDL","SDL_main","attendre touche",il ecrit aussi" ID return1exit status""first defined here" qu'elle est la solution merci d'avance