using sdl and other libraries in *nix environments

Hi, I'm using Ubuntu and in need of direction/help with the SDL library and others... I'm really asking how do you use the runtime libraries... and developmental libraries...

can this be explained in a generic format, so I can use this information if I wanted to use other libraries etc etc

If this is confusing in anyway, I probably don't know what I'm talking about fully...

I want to use the sdl library basically but don't know how to use it... i'ved dled sdl dev and runtime libraries but want a generic formated lesson on how to use runtime and devel libraries in linux

thanks
To use it in your source code:
#include <SDL/SDL.h>

To compile using the main SDL library for C++:
g++ -o OUTFILE FILE... -l SDL
or for vanilla C:
gcc -o OUTFILE FILE... -l SDL
where OUTFILE is the name of your output file and FILE... is a space-separated list of input files, whether they're object files or source files. Note that "-l" is the short option for --library, so make sure you use a lowercase 'L' rather than an uppercase 'i'.
Last edited on
i'm not sure i phantom what you're saying exactly... outfile would be the development file?


from the www.libsdl.org site, i dled two files... a development file and a runtime file , SDL-devel-1.2.14-1.x86_64.rpm and SDL-1.2.14-1.x86_64...


i'm not sure where these files go?...

is there possibly a guide/tutorial online that will definitively teach me about this?

I mean I'm totally confused.... and it is really hindering me!

I never had to use header files... and the book i had teaching me this is M.I.A(i took like a year break doing c++)
oh so where i compile ... 'files...' there should be the development files from the sdl library

or is sdl already in g++?
You need to install the package libsdl1.2-dev first.
Type
sudo apt-get install libsdl1.2-dev
into the terminal or use Synaptic to install the package.

You probably should use an IDE (such as Code::Blocks) if you're new at this. It will call the compiler with the appropriate parameters for you.
thanks all.. and i will athar.
Topic archived. No new replies allowed.