[SDL] Installing SDL development libraries on Linux

Sami Näätänen sami.naatanen at kolumbus.fi
Fri Feb 21 15:59:01 PST 2003


On Saturday 22 February 2003 01:39, Tyler Montbriand wrote:
> Ok, here's my situation:  My hard drive died last week, and I decided
> to try a Mandrake 9.0 installation instead of returning to the dark
> ways of W98... Must say I'm quite amazed at how well it's working so
> far...
>
> My point?  Oh yeah.  I want to be able to compile SDL apps.  I'm very
> familiar with SDL itself from my coding under W98, somewhat familiar
> with Linux from my messing with the Linux boxes at the U of R, and
> once went through the KDeveloper FAQ and managed to make a working
> SDL application.  So that's my skill level at the moment.
>
> I made an extremely simple .c file that includes "SDL.h" and contains
> empty main() that just returns 0, and compiled it with gcc like 'gcc
> -o myproggy myproggy.c', and it can't find SDL.h.  No problem, I
> thought, just install the source RPM right?  According to KPackage,
> this box's got libSDL 1.2.4 on it, so I downloaded the appropriate
> source RPM and installed it.  Nothing.  I can't even FIND sdl.h or
> any of the sourcecode searching through the directory tree...  so,
> how do I get the SDL source installed properly?

You need sdl-devel not the source.

And you need to link the sdl library too.
The following line is usefull, because you don't need to think what 
libraries to link etc.

gcc `sdl-config --cflags` `sdl-config --libs` -o exename source.c





More information about the SDL mailing list