SDL on Ubuntu

Questions or HOWTOs about the above? Post 'em here...
Post Reply
User avatar
pooper
Private First Class
Private First Class
Posts: 23
Joined: Fri Dec 22, 2006 3:42 pm
Location: Portland, ME

SDL on Ubuntu

Post by pooper »

I'm trying to compile BZFlag on Ubuntu 9.04, and found out that I didn't have SDL. I downloaded SDL 1.2.13 and am trying to install it. Configure runs fine, but when I try to make it I get
owen@Badassasaurus:~/Desktop/SDL-1.2.13$ make
/bin/bash ./libtool --mode=compile gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/x11/SDL_x11dga.c -o build/SDL_x11dga.lo
gcc -g -O2 -I./include -D_GNU_SOURCE=1 -fvisibility=hidden -DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c ./src/video/x11/SDL_x11dga.c -fPIC -DPIC -o build/.libs/SDL_x11dga.o
In file included from ./src/video/x11/SDL_x11video.h:53,
from ./src/video/x11/SDL_x11dga_c.h:24,
from ./src/video/x11/SDL_x11dga.c:30:
./src/video/x11/SDL_x11dyn.h:39:33: error: X11/extensions/XShm.h: No such file or directory
In file included from ./src/video/x11/SDL_x11dga_c.h:24,
from ./src/video/x11/SDL_x11dga.c:30:
./src/video/x11/SDL_x11video.h:80: error: expected specifier-qualifier-list before 'XShmSegmentInfo'
make: *** [build/SDL_x11dga.lo] Error 1
Am I doing something wrong? Is there an alternate version of SDL I should download? Or is it just incompatible with my OS or something?
User avatar
Bullet Catcher
Captain
Captain
Posts: 564
Joined: Sat Dec 23, 2006 7:56 am
Location: Escondido, California

Re: SDL on Ubuntu

Post by Bullet Catcher »

The easiest way to get SDL is to install the Ubuntu package:

Code: Select all

apt-get install libsdl-dev
should do it. Other Ubuntu packages you may need are:
  • libgl1-mesa-dev
  • libglu1-mesa-dev
  • libcurl3-dev
  • libsdl-sound1.2-dev
User avatar
pooper
Private First Class
Private First Class
Posts: 23
Joined: Fri Dec 22, 2006 3:42 pm
Location: Portland, ME

Re: SDL on Ubuntu

Post by pooper »

I had no idea there was a package for it. I searched before I went to download it on my own, but didn't see it. Thanks!
Janis
Private First Class
Private First Class
Posts: 12
Joined: Sun Jan 06, 2008 6:28 pm

Re: SDL on Ubuntu

Post by Janis »

what version of bzflag you are trying to compile?
2.0.8?

lets make it clear..

1) you have to download SDL-1.2.10 source files
2) access root
3) build your own SDL.framework on your hd. [ allready built up version doesn't work ]
4) download bzflag (2.0.0 - 2.0.10) source files.
5) cd to it
and build your client (sh autogen.sh ; make ; and so on)

ah yee before you begin installation.. dont forget to ./configure it with your built SDL.framework
Post Reply