Page 1 of 1

SDL on Ubuntu

Posted: Tue Oct 13, 2009 11:45 pm
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?

Re: SDL on Ubuntu

Posted: Wed Oct 14, 2009 6:07 am
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

Re: SDL on Ubuntu

Posted: Fri Oct 16, 2009 4:31 am
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!

Re: SDL on Ubuntu

Posted: Sun Oct 18, 2009 4:21 pm
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