Sign in to follow this  
gordy_freeman

having problems with setting up the SDL

Recommended Posts

Hello. I am a Dev-C++ user, and recently I have tried to set-up the SDL files in my compailer . I followed the instructions in the website "Lazy Foo", located in this page - http://www.lazyfoo.net/SDL_tutorials/lesson01/windows/devcpp/index.php But, its just just doesn't work: http://img360.imageshack.us/my.php?image=devgo4.jpg I tried to find my mistakes, and repeat the instructions a couple of times, but it doesent help, and the Dev-C++ repuses to use the SDL files. what sould I do? are there any alternative solutions? P.S: I have "Vista".

Share this post


Link to post
Share on other sites
Hi.

Next time just post the error message instead of a screen grab.
The problem comes from the fact that your compiler cannot find the SDL include files. You will need to tell your IDE where your SDL include files are.
I don't know how to do that since I have never used Dev-Cpp but AFAIK this IDE is outdated. Since you said you are using Vista I strongly recommend you to give Visual Studio 2008 Express a try.

HTH.

Share this post


Link to post
Share on other sites
Quote:
Original post by gordy_freeman
Quote:
Original post by rip-off
Have you followed step 4:
Quote:

After that, open the include subfolder in the archive and extract the folder named "SDL" to the Dev C++ include folder, which should be at C:\Dev-Cpp\include.


Yep


You will need to include "SDL/SDL.h" then [wink]

Share this post


Link to post
Share on other sites
You may have copied the files into a subdirectory of include.

For example, SDL.h could be found in C:/.../include/SDL/SDL.h

You can add this subdirectory to your project.
Somewhere in project->settings (or possibly tools->compiler settings) there should be an option to add "additional include directories". You can add your subdirectories here.

Quote:

You will need to include "SDL/SDL.h"


This is not recommended by the SDL documentation. This is highly dependant on the users development setup. Easier to have a single place to change the value (the project settings) than have to change the include statements in many files. This is only important if you want to keep the code portable, or you want to publish it.

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