So I've recently started learning C++ and game design. Today I decided to mess around with SDL. Unfortunately, I failed to install it on Dev-C++, Eclipse, and Visual Studio 2010 Express. My last attempt at installing SDL came with Visual C++ 2005. I haven't successfully installed it, but this is the closest I have got.
I followed the Lazy Foo SDL installation tutorial exactly, but I have problems when trying to compile anything. For example, I tried to compile this in Visual C++ 2005:
#include "SDL.h"
int main( int argc, char* args[] )
{
//Start SDL
SDL_Init( SDL_INIT_EVERYTHING );
//Quit SDL
SDL_Quit();
return 0;
}
[/quote]
And I received two errors, as my build log states:
1>------ Build started: Project: SDL Test, Configuration: Debug Win32 ------
1>Compiling...
1>SDL Test.cpp
1>c:\users\richard\documents\visual studio 2005\projects\sdl test\sdl test\sdl test.cpp(14) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1>Test File.cpp
1>c:\users\richard\documents\visual studio 2005\projects\sdl test\sdl test\test file.cpp(13) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1>Generating Code...
1>Build log was saved at "file://c:\Users\Richard\Documents\Visual Studio 2005\Projects\SDL Test\SDL Test\Debug\BuildLog.htm"
1>SDL Test - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========[/quote]
After spending a few hours searching the interent and coming across forum threads, I am still unable to figure out what is wrong.
Also, before anyone asks, I did insert "stdafx.h", but that did not fix the error.