Gentoo Wiki ArchivesGentoo Wiki

HOWTO_SDL_Development

To develop SDL programs, it is not necessary to download development libraries as stated in SDL's main page. As long as libsdl is installed

emerge libsdl

You can link to it.

gcc program.c -lSDL

Same goes with other SDL helper libraries, such as sdl-mixer:

gcc program.c -lSDL -lSDL_mixer

One thing you should keep in mind though, is that in most code examples you will see:

include "SDL/SDL.h"

which assumes you have the libraries in your development directory. Just do:

include <SDL/SDL.h>

instead and it will work.

Perhaps there is a good reason to get the development libraries (and if so, it should be added here), but, at least in Gentoo, you can still make programs without them.

External Links

Retrieved from "http://www.gentoo-wiki.info/HOWTO_SDL_Development"

Last modified: Sat, 06 Sep 2008 09:04:00 +1000 Hits: 1,066

Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and real estate agent tools.