Posted by dxprog on 06:14:00 12-14-2002
I'm trying to learn SDL, but I have a tiny problem. When I try to compile the program it says that it can't find SDL\SDL.h. I looked and the folder and file both exist, so I'm stumped. How do I fix this problem. Note - I am doing the first sample from Chapter 4 in that Linux game programming "book"
[addsig]
Posted by Neu[Mann] on 07:45:00 12-14-2002
Add the directory where your 2 includes files are located on the compiler command line. Usually, it's the /I:[path] switch or something like that.
You have to do link the .lib (both SDL.lib and SDLmain.lib also).
Posted by KaGez on 23:33:00 12-15-2002
hmmmm
a guess:
are you using
#include
or
#include "SDL\SDL.h"
?
May sound stupid, but some do this mistake
Also, if nothing helps, try using a \ instead of /.
[addsig]
Posted by dxprog on 02:08:00 12-17-2002
I did the second one with a / because that's waht they said. I'll try the backslash though.
[addsig]
Posted by KaGez on 23:12:00 12-17-2002
ack... it looks like the
#include <SDL\SDL.h>
didn't show up... forgot to turn off HTML
[addsig]
Posted by dxprog on 23:13:00 12-17-2002
I reinstalled RedHat yesterday and included SDL in that and everything is working much better now. I can't get over how simple SDL is.
[addsig]
Posted by KaGez on 23:40:00 12-17-2002
If you know C++, and you're looking for a robust and easy, and also designed for C++ library, you should try ClanLib. I'm right now helping the guys there too, and the lib is just awsome!
[addsig]
Posted by ap on 07:41:00 08-25-2003
I know you got it working, but if you installed SDL it might've been installed to /usr/local. GCC (or whatever C compiler you're using) might need the "-I/usr/local/include" (when compiling) and "-L/usr/local/lib" (when linking) flags so it can search the proper directories.
Posted by KaGez on 00:58:00 08-30-2003
that's also a solution which would probably help with many other problems too. Nice follow up
[addsig]