Witam serdecznie!
Ostatnio zacząłem programować w c++ za pomocą biblioteki SDL.
Zacząłem pisać ten kod:
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_mixer.h>
#include <SDL/SDL_ttf.h>
#include <string>
#include <windows.h>
int main (int argc, char *args[])
{
SDL_Event exit;
SDL_Init(SDL_INIT_EVERYTHING);
SDL_Window *screen1=NULL;
SDL_Surface *hello=NULL;
screen1= SDL_SetVideoMode(600,480,32,SDL_SWSURFACE);
int frame=1;
for(;;)
{
while(SDL_PollEvent(&exit))
{
if(exit.type==SDL_QUIT)
{
return 0;
}
}
if(frame==1)
{
hello = SDL_LoadBMP("cb.bmp");
SDL_BlitSurface(hello,NULL,screen,NULL);
SDL_Flip(screen);
SDL_FreeSurface(hello);
}
}
}
i mi wyskoczyło takie coś: Error: SDL_Window was not declared in this scope.
Nie wiem czemu mi niedziała.
Jakby można to proszę o odp. na moje pytanie. Serdecznie pozdrawiam!