can i get a full walkthrough of how to setup SDL for VS express?

Started by
12 comments, last by Mushu 18 years, 2 months ago
/* -- Include the precompiled libraries -- */#define WIN32#ifdef WIN32#pragma comment(lib, "SDL.lib")#pragma comment(lib, "SDLmain.lib")#endif#include "SDL.h"int main(int argc, char **argv){	printf("\nHello SDL User!\n");	/* initialize SDL */	if ( SDL_Init( SDL_INIT_VIDEO ) < 0 )	{		fprintf( stderr, "Video initialization failed: %s\n",			SDL_GetError( ) );		SDL_Quit( );	}		SDL_Quit( );	return 0;}


same error :
i've checked the instructions over at least 5 times now, and made 3 new projects...
Advertisement
._. i feel stupid...

i guess VS2005 just doesn't like SDL, because i went back and set it up again in VS2003, and it worked.

i compared everything for both VS2003 and VS2005, they both matched up perfectly, either that or there's some extra/different steps for setting it up with VS2005.

i may as well use VS2003 anyway, since i have it at home and at school, i only have VS2005 at home.

thanks for all the help everybody :D

not only do i have SDL set up now, but i'm pretty sure i can use the knowlege of how to setup SDL, and apply it to other things i might want to use.
Quote:Original post by econobeing
._. i feel stupid...

i guess VS2005 just doesn't like SDL, because i went back and set it up again in VS2003, and it worked.

i compared everything for both VS2003 and VS2005, they both matched up perfectly, either that or there's some extra/different steps for setting it up with VS2005.

i may as well use VS2003 anyway, since i have it at home and at school, i only have VS2005 at home.

thanks for all the help everybody :D

not only do i have SDL set up now, but i'm pretty sure i can use the knowlege of how to setup SDL, and apply it to other things i might want to use.


Shouldn't that be:
#pragma comment(lib, "SDLmain.lib")#pragma comment(lib, "SDL.lib")

And not:
#pragma comment(lib, "SDL.lib")#pragma comment(lib, "SDLmain.lib")


I personally prefer code::blocks but only because of it's simpleness. When it comes to debugging I ise microsoft since it is simply the best at that.
I'm using VC2005 Express and can't duplicate your error - the code you posted compiles fine on my system. Weird.

I'm using the default project settings for an empty Win32 Console Application, not an empty project, though. That might be your problem - VC2005 is really nasty with its templates. But I still lub it :)

This topic is closed to new replies.

Advertisement