SDL with visual C++

Hey i got SDL linked into visual C++, but when i try to run the following
code it gives me an error…

#include “stdafx.h”
#include “SDL.h”

int main()
{
//Start SDL
SDL_Init( SDL_INIT_EVERYTHING );

//Quit SDL
SDL_Quit();
return 0; 

}

the errror:

(1) : fatal error C1010: unexpected end of file while looking for
precompiled header. Did you forget to add ‘#include “stdafx.h”’ to your
source?–
View this message in context: http://www.nabble.com/SDL-with-visual-C%2B%2B-tp23891987p23891987.html
Sent from the SDL mailing list archive at Nabble.com.

Just one question: Why you are using precompiled headers???

2009/6/5 T3mp3st <max_revelle at hotmail.co.uk>>

Hey i got SDL linked into visual C++, but when i try to run the following
code it gives me an error…

#include “stdafx.h”
#include “SDL.h”

int main()
{
//Start SDL
SDL_Init( SDL_INIT_EVERYTHING );

   //Quit SDL
   SDL_Quit();
   return 0;

}

the errror:

(1) : fatal error C1010: unexpected end of file while looking for
precompiled header. Did you forget to add ‘#include “stdafx.h”’ to your
source?

View this message in context:
http://www.nabble.com/SDL-with-visual-C%2B%2B-tp23891987p23891987.html
Sent from the SDL mailing list archive at Nabble.com.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Don’t use the Visual Studio default template if you don’t want the stdafx.h precompiled header. Create an empty project and try again.

HtH,

Victor Freire_________________________________________________________________
Lauren found her dream laptop. Find the PC that?s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290

Remember to put
#pragma comment(lib, “SDL.lib”)
on every lib you use with SDL or include them in project properties.

2009/6/7 Victor Freire > Don’t use the Visual Studio default template if you don’t want the

stdafx.h precompiled header. Create an empty project and try again.

HtH,
Victor Freire


Lauren found her dream laptop. Find the PC that?s right for you.http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org