SDL tutorial program compiles but won't run

I have been trying to follow the basic tutorial for using SDL with vs 2010.

I completed all the setup (include files, lib files etc and the whole code compiled and linked without any problems. The problem is when I try to run the program I get the message "the application was unable to start correctly error code 0xc000007b, click close"

Does anyone know what the problem is and how I deal with it?

I am running windows 7 64 bit system with vs 2010 express.
A link to which SDL tutorial you are running would really help us. Also have you tried running this exe directly without the IDE sandboxing it? What about right clicking on the exe and trying compatibility mode?
Thanks Computergeeks01

The tutorial is (parts 1 and 2) on http://www.lazyfoo.net/SDL_tutorials/lesson01/index2.php



actual code (which, as I said compiles and links OK) is:


#include "SDL.h"
int main( int argc, char* args[] )
{ //The images
SDL_Surface* hello = NULL;
SDL_Surface* screen = NULL;

//Start SDL
SDL_Init( SDL_INIT_EVERYTHING );
//Set up screen
screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE );
//Load image
hello = SDL_LoadBMP( "hello.bmp" );


//Apply image to screen
SDL_BlitSurface( hello, NULL, screen, NULL );
//Update Screen
SDL_Flip( screen);
//Pause
SDL_Delay( 2000 );
//Free the loaded image
SDL_FreeSurface( hello );





//Quit SDL
SDL_Quit();
return 0;
}
Can your program find "hello.BMP"? It needs to be in the working directory of the process.
Many thanks for your help Computergeek01. I have found the problem. The SDL.dll file was in the wrong place, as soon as I moved it to the working folder it was OK.
Thanks again for taking your time to assist.
Topic archived. No new replies allowed.