Compiling xoreos-tools

From xoreos Wiki
Revision as of 11:01, 16 September 2015 by DrMcCoy (talk | contribs) (Add a page for compiling xoreos-tools, similar to the xoreos page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page gives a few tips and pointers on how to compile xoreos-tools on various platforms.

Compiler and build system

xoreos-tools is written in C++, so a C++ compiler, like GCC or clang is required. It has two build systems: Autotools (Autoconf, Automake and Libtool) and CMake. Use whichever you feel more comfortable with.

GNU/Linux

On Debian-based distributions (including Ubuntu), you should be able to install the required compiler and build system packages with

apt-get install libc6-dev g++ make autoconf automake libtool gettext

On other distributions, it should work similarily.

Windows

Since Visual Studio does not work with autotools, you have to use the CMake build system if you want to compile xoreos with Visual Studio. If you're using MinGW, however, you're free to choose either build system.

Libraries

xoreos-tools uses the following libraries to function:

On Debian-based GNU/Linux distribution (including Ubuntu), you should be able to install these libraries and their development packages with

apt-get install zlib1g-dev libxml2-dev

Other GNU/Linux distributions should work similarily. Windows users have to visit each website manually and download a precompiled version, or, if not available, download the source and compile the library themselves.

Compiling xoreos

Make you have your compiler, build system and libraries installed correctly. Then open a terminal and change into the directory of your sources.

autotools

Type

./autogen.sh && ./configure && make

The binaries can then be found in the src subdirectory.

Optional, non-conventional ./configure flags:

  • --with-werror  
Compile with -Werror
  • --without-warnings  
Compile without the extra warnings enabled
  • --with-lto  
Compile with link-time optimization


CMake

Type

cmake . && make

The binaries can then be found in the bin subdirectory.

Please read Running CMake on the CMake website for in-depth information on invoking CMake.