Sign in to follow this  
RchrdJ

Need Help With SDL and Visual C++ 2005

Recommended Posts

RchrdJ    100
Hi,

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 [url="http://lazyfoo.net/SDL_tutorials/lesson01/windows/msvsnet0508e/index.php"]Lazy Foo SDL installation tutorial[/url] exactly, but I have problems when trying to compile anything. For example, I tried to compile this in Visual C++ 2005:

[quote]


#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:

[quote]

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.

Share this post


Link to post
Share on other sites
rip-off    10979
Disable precompiled headers in your project settings. Getting SDL to work in Visual Studio 2010 should be similar to 2005. I'd recommend taking the time to get the most up to date IDE working.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this