Problemme Programation
PRGCIA
Messages postés
5
Statut
Membre
-
PRGCIA Messages postés 5 Statut Membre -
PRGCIA Messages postés 5 Statut Membre -
Bonjour, Je Programme Sous Code::Block et quand je compile sa me met sa
Sous Codeblock :
||=== Ratchet & Clank, Debug ===|
Clank\main.c||In function 'int SDL_main(int, char**)':|
Clank\main.c|24|error: 'pause' was not declared in this scope|
||=== Build finished: 1 errors, 0 warnings ===|
Sous Visual C++ :
Sa me met : la sdl.h est impossible a lire
ps : je code sous windows 7
Merci de bien vouloir maider a resoudre un des deux probleme
Sous Codeblock :
||=== Ratchet & Clank, Debug ===|
Clank\main.c||In function 'int SDL_main(int, char**)':|
Clank\main.c|24|error: 'pause' was not declared in this scope|
||=== Build finished: 1 errors, 0 warnings ===|
Sous Visual C++ :
Sa me met : la sdl.h est impossible a lire
ps : je code sous windows 7
Merci de bien vouloir maider a resoudre un des deux probleme
4 réponses
tient voicis le code que jai mis
#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
int main(int argc, char *argv[])
{
SDL_Surface *ecran = NULL, *imageDeFond = NULL;
SDL_Rect positionFond;
positionFond.x = 0;
positionFond.y = 0;
SDL_Init(SDL_INIT_VIDEO);
ecran = SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE);
SDL_WM_SetCaption("Chargement d'images en SDL", NULL);
/* Chargement d'une image Bitmap dans une surface */
imageDeFond = SDL_LoadBMP("57051420070406_003004_1_big");
/* On blitte par-dessus l'écran */
SDL_BlitSurface(imageDeFond, NULL, ecran, &positionFond);
SDL_Flip(ecran);
pause();
SDL_FreeSurface(imageDeFond); /* On libère la surface */
SDL_Quit();
return EXIT_SUCCESS;
}
#include <stdlib.h>
#include <stdio.h>
#include <SDL/SDL.h>
int main(int argc, char *argv[])
{
SDL_Surface *ecran = NULL, *imageDeFond = NULL;
SDL_Rect positionFond;
positionFond.x = 0;
positionFond.y = 0;
SDL_Init(SDL_INIT_VIDEO);
ecran = SDL_SetVideoMode(800, 600, 32, SDL_HWSURFACE);
SDL_WM_SetCaption("Chargement d'images en SDL", NULL);
/* Chargement d'une image Bitmap dans une surface */
imageDeFond = SDL_LoadBMP("57051420070406_003004_1_big");
/* On blitte par-dessus l'écran */
SDL_BlitSurface(imageDeFond, NULL, ecran, &positionFond);
SDL_Flip(ecran);
pause();
SDL_FreeSurface(imageDeFond); /* On libère la surface */
SDL_Quit();
return EXIT_SUCCESS;
}