teeworlds logo
 

Compiling Teeworlds

IMPORTANT NOTE: Teeworlds requires python 2.x to compile. Python 3.0 will not work.

FAQ

Q: How do I get rid of these errors?

undefined reference to `__stack_chk_guard'

Remove

-fstack-protector -fstack-protector-all

from default.bam in Teeworlds root directory and then run

../bam/src/bam -c all

Windows

Setup

1. Download and install Visual C/C++ Express (http://www.microsoft.com/express/download/default.aspx)
2. Download and install Python (http://www.python.org/download/). the 2.x version, not 3.x
3. Download and unzip bam 0.3.2 (http://teeworlds.com/trac/bam/browser/releases/bam-0.3.2.zip?format=raw)
4. Download and unzip teeworlds (http://www.teeworlds.com/?page=downloads)

Compiling bam

Run in cmd (start>run>cmd):

cd bam
make_win32_msvc.bat
cd ..

Compiling teeworlds

Run in cmd (start->run->cmd):

%comspec% /k ""C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86

cd teeworlds-version-src 

..\bam\src\bam release

for all stuff,

..\bam\src\bam server_release

for server only,

..\bam\src\bam debug

for debug version of all,

..\bam\src\bam server_debug

for debug version of server.

Linux / Mac

Setup

On Linux

Use your package manager (apt-get, emerge or whatever is used on your distro) to install the following: (python is the only one which is required to build server)

python
alsa (asound)
gl
glu
x11

On Mac OS X

Install the XCode tools from apple, make sure to install the 10.4 SDK with it. Download libsdl from the http://libsdl.org and put SDL.framework in /Library/Frameworks

Getting the source

Run the following commands to download and unzip bam and teeworlds:
Replace VERSION in teeworlds-VERSION-src.zip with the version you want (probably the latest, 0.5.0)

$ fetch http://teeworlds.com/trac/bam/browser/releases/bam-0.2.0.zip?format=raw
$ unzip bam.zip
$ rm bam.zip
$ fetch http://teeworlds.com/files/teeworlds-VERSION-src.zip
$ unzip teeworlds-VERSION-src.zip
$ rm teeworlds-VERSION-src.zip

Compiling bam

$ cd bam
$ ./make_unix.sh
$ cd ..

Compiling teeworlds

$ cd teeworlds-VERSION-src

$ ../bam/src/bam release

for all stuff,

$ ../bam/src/bam server_release

for server only,

$ ../bam/src/bam debug

for debug version of all,

$ ../bam/src/bam server_debug

for debug version of server.