Issues with SDL and VC++ 2008
Posted: Sat Nov 21, 2009 10:35 am
Well, I already have SDL set up and working for Dev-C++ (using the devpak) but have decided I would like to use VC++. So, I've followed the tutorial on Lazy Foo's website word for word, but I get still get the error "fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory".
I have checked the following things, and they all appear to have been done correctly:
Added the paths to lib and include folders to the VC++ Directories in the Options window.
Gone to the Project Properties window and: set 'Detect 64-bit Portability issues' to No, set 'Runtime Library' to 'Multi-threaded DLL(/MD), under the Linker tab added 'SDL.lib' and 'SDLmain.lib' to the Additional Dependencies and set the subsystem to 'Windows (/SUBSYSTEM:WINDOWS)'.
Placed SDL.dll in my project's directory.
The code im trying to compile to test it with is as follows, I don't think theres any problems here (SDL.h is not in a seperate folder and so does not need to be SDL/SDL.h)
And still, the error occurs. Maybe I'm just missing something? Some advice would be much appreciated.
I have checked the following things, and they all appear to have been done correctly:
Added the paths to lib and include folders to the VC++ Directories in the Options window.
Gone to the Project Properties window and: set 'Detect 64-bit Portability issues' to No, set 'Runtime Library' to 'Multi-threaded DLL(/MD), under the Linker tab added 'SDL.lib' and 'SDLmain.lib' to the Additional Dependencies and set the subsystem to 'Windows (/SUBSYSTEM:WINDOWS)'.
Placed SDL.dll in my project's directory.
The code im trying to compile to test it with is as follows, I don't think theres any problems here (SDL.h is not in a seperate folder and so does not need to be SDL/SDL.h)
Code: Select all
#include "SDL.h"
int main( int argc, char* args[] )
{
SDL_Init( SDL_INIT_EVERYTHING );
SDL_Quit();
return 0;
}