PDA

View Full Version : [SOLVED] sdl



vikasmk
March 6th, 2008, 12:38 PM
hi, i'm i installed the sdl library using synaptic but how do i include them in my program , i dont know where they go once downloaded.

irrdev
March 6th, 2008, 12:50 PM
The main SDL .a and .so files can be found at /usr/lib/libSDL.a and /usr/lib/libSDL.so respectively. The SDL include files can be found in the folder /usr/include/SDL/

mike_g
March 6th, 2008, 01:00 PM
To include SDL in your program:

#include "SDL/SDL.h"
To Link SDL to your project:

gcc -Wall main.c -lSDL

hod139
March 6th, 2008, 03:15 PM
To include SDL in your program:

#include "SDL/SDL.h"To Link SDL to your project:

gcc -Wall main.c -lSDL

This is not the recommended (http://www.libsdl.org/faq.php?action=listentries&category=2#19) way. To include SDL in your program:


#include "SDL.h"


To build


gcc -Wall `sdl-config --cflags --libs` main.c

vikasmk
March 6th, 2008, 03:54 PM
thanx i also saw all the other libraries i had previously installed but didnt know where they went

kaens
March 6th, 2008, 04:27 PM
thanx i also saw all the other libraries i had previously installed but didnt know where they went

For future reference, if you ever need to know what files got put where by a package you can do the following:



dpkg --contents /var/cache/apt/archives/packagename