Setting Up Sdl In Dev C++


dpoarch

Member
Joined
Dec 26, 2004
Messages
196
Age
37
Location
california
Website
Visit site
I am trying to set up sdl and some extension librarys but for some reason SDL_ttf doesn't want to work. I have set up SDL_image and it works fine and I set up SDL_ttf the same way as SDL_image on two computers and both dont't work properly. If I try to compile something with SDL_ttf it says that it doesn't exist. Any ideas?
 
Give us the eror message or we just have to guess ...

The link step some times needs to know where the libaries are if they are in with the other default libraries. Using the "-l/path/to/your/library/files" tells the linker where in addition to the default locations it can look. Of course if the error message is not during the link then what I lust said is useless....
 
dpoarch posted on Oct 2 2006 at 10:11 PM said:
sorry the error is:

SDL/SDL_ttf.h: No such file or directory.

It is in the same directories as everything else.

What it is saying is that in the compilers search for the include file in it's search path it could not find it. Are there other files in this driectory that it is finding? If so I would check the source file that includes this file and see how the #include directive os formed. If it has "" around the inlude file name it searches a different path than if it have <> around the file name.

This portion of the message that you gave us says that in some directory there is another directory called SDL and in that directory is the file SDL_ttf.h.
 
Last edited by a moderator:
yeah I set it up the way it says in lazy foo's tutorial and all the of the headers are in a folder called sdl in the include folder, the files that came from the sdl lib folder are in the Dev-Cpp lib folder, and the bin sdl files are in the Dev-Cpp bin folder. Here is how I include them:

#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "SDL/SDL_ttf.h"
#include <string>

all of the sdl headers are in the same folder but it only throws an error for SDL_ttf.h. Also the code is from an example on lazy foo's website that I was using to make sure its working properly.
 
Back
Top