having problems with setting up the SDL

Started by
4 comments, last by rip-off 15 years, 6 months ago
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".
Advertisement
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.
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.
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
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]
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.

This topic is closed to new replies.

Advertisement