This wiki is archived and useful information is being migrated to the main bzflag.org website
Compiling
Contents
Overview
Compiling BZFlag is the act of taking the raw source codes for the game and using tools to build an executable application(s) for a target system.
Source Code
In order to compile a user must have his or her own copy of the Source Code. The code can be obtained from a source archive from the Download page, or from the BZFlag_SVN server.
Readme Files
Users should always read the README files for the appropriate operating system. These files are located in the root directory of the source code tree.
Compilers
BZFlag is capable of being built on a number of compilers. The compiler used will depend in some way on the operating system of the computer doing the build.
Linux computers, use the GCC compiler. Macintosh Computers use the XCode compiler Windows Computers can use the Visual C++ compiler, or the MinGW compiler (based on GCC)
GCC
The GCC build as a number of requirements;
- Automake X.XX
- Autoconf X.XX
- Autotools X.XX
- SDL Development libraries 1.2.10 or greater (on Mac OS X you need 2.99 from svn and SDL 1.3 which is also only in SVN, to build BZFlag x86_64 binaries; i386 binaries should build fine using Mac OS X version 10.6 after setting the correct environment variables to avoid building x86_64 instead)
- OpenGL Development libraries 1.1 or greater
If the required dependencies are installed, the user must then run the following commands from at root level of the source tree
./autogen.sh ./configure make make install
Please note that depending on permissions levels the make install command may need to be run as an administrator or root. On Mac you can either run make to find any problems, or xcodebuild (after ./configure) to make an .app that is useable.
XCode
Launch XCode and open the bzflag/BZFlag.xcodeproj project. Note that XCode should have BZFlag selected as the active target and Development as the active build configuration. Click on Targets then click the Build icon. When this process completes, your application will be in bzflag/build/Development. You can then move it wherever you like.
Visual C++
2.0.x
Compiler
In order to compile, you need to have Visual C++ 2003 or higher (Express version works just fine).
To get the latest Express version of Visual C++, visit http://www.microsoft.com/express/vc/
Dependencies
In order to compile you need ALL of the following:
Microsoft DirectX SDK April 2007 (Only the Headers and Libraries)
Windows Platform SDK (This is not required for Visual C++ 2008)
LibCURL
GLEW
PDCurses
You then need to add them to your VC++ Directories, both include and lib folders.
2.99.x =
Compiler
In order to compile, you need to have Visual C++ 2008 or higher (Express version works just fine).
To get the latest Express version of Visual C++, visit http://www.microsoft.com/express/vc/
Dependencies
Microsoft DirectX SDK November 2008
PDCurses
You then need to add them to your VC++ Directories, both include and lib folders.
Other build systems
Other build systems may be supported in the various readme files (minGW, IRIX, SOLARIS,etc..)