I am trying to use SDL to make a movie easter egg. The movie code is
I am running Dev-C++ on windows 7 and I followed Lazy-foo's tutorial. I get a linker error in the form ofCode:#include <iostream> #include <string> #include "SDL.h" using namespace std; int i; int main(int argc, char* args[]) { cout << "Welcome to the movie easter egg."; 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; } }
[linker error] undefined reference to 'SDL_Init'
and I get linker errors to everything sdl in the code also. I also get a linker error to winmain@16. This isn't a project but a source file. I am not going to create a project unless it is absolutely necessary. Please help.




Reply With Quote
