Fine here is my code and the errors. I fixed the issues above and now have new ones.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
//Basic libraries
#include <iostream>
#include <string>
#include "SDL.h"
using namespace std;
int i;
int main(int argc, char* args[]) {
cout << "Welcome to my movie.";
i = 1;
if (i == 1) {
SDL_Surface* frame1 = NULL;
SDL_Surface* screen = NULL;
if((SDL_Init(SDL_INIT_EVERYTHING)==-1)) {
cout << "Error initiating movie."; }
screen = SDL_SetVideoMode( 640, 480, 64, SDL_HWSURFACE );
frame1 = SDL_LoadBMP( "C:\\Users\\User\\Desktop\\Frames\\Frame1.bmp" );
SDL_BlitSurface( frame1, NULL, screen, NULL );
SDL_Flip( screen );
SDL_Delay(2000);
SDL_FreeSurface( frame1 );
SDL_Quit();
return 0;
}
}
|
I get the errors:
warning: `SDL_Init' initialized and declared `extern'
`Uint32' was not declared in this scope
warning: `SDL_InitSubSystem' initialized and declared `extern'
error: `Uint32' was not declared in this scope
warning: `SDL_QuitSubSystem' initialized and declared `extern'
error: variable or field `SDL_QuitSubSystem' declared void
error: `Uint32' was not declared in this scope
error: `Uint32' does not name a type
In function `int main(int, char**)':
error: `SDL_Surface' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
error: `frame1' undeclared (first use this function)
error: `screen' undeclared (first use this function)
error: `SDL_HWSURFACE' undeclared (first use this function)
error: `SDL_SetVideoMode' undeclared (first use this function)
error: `SDL_LoadBMP' undeclared (first use this function)
error: `SDL_BlitSurface' undeclared (first use this function)
error: `SDL_Flip' undeclared (first use this function)
error: `SDL_Delay' undeclared (first use this function)
error: `SDL_FreeSurface' undeclared (first use this function)
Execution terminated