Gamedev Framework (gf)  0.5.0
A C++11 framework for 2D games
Build and install gf

Table of Contents

In this document, you will learn how to build and install gf so that you are ready for your first project with gf. It is assumed you already have a compiler installed (gcc or clang for Linux; MSVC included in Visual Studio for Windows).


gf needs some external libraries and tools that you must install before compiling gf. Here are some information about these libraries, especially the required minimum version.


Name Version License
SDL2 2.0.2 zlib/libpng
Boost Filesystem 1.55 Boost
Boost String Algorithms 1.55 Boost
Freetype 2.5.2 Freetype


Name Version
CMake 3.0.2

Getting started with Linux

This section assumes you have a working compiler, either gcc or clang, and git.

Dependencies for Linux

The recommanded way for handling dependencies on Linux is to use your favorite distribution's package manager. Here are the packages needed to build gf for various widespread distributions.

For Debian/Ubuntu:

apt-get install libsdl2-dev libboost-filesystem-dev libboost-dev libfreetype6-dev cmake

For Archlinux:

pacman -S sdl2 boost freetype2 cmake

For Fedora/Red Hat/CentOS:

dnf install SDL2 boost freetype cmake

Build and install

First, build:

git clone
cd gf
git submodule update --init
mkdir build
cd build

Then install:

make install # may require root permissions

Getting started with Windows

This section assumes you are using at least Visual Studio Community 2015. You also need git for Windows and CMake 3.8 or newer. Finally, the working directory where everything will be installed is set to C:\Local\. You can choose whatever directory you want.

Dependencies for Windows

For Windows, vcpkg can handle the dependencies.

First, you have to install vcpkg from its git repository. From a command line, in the working directory:

C:\Local> git clone
C:\Local> cd vcpkg

Then, you have to follow the instructions from the vcpkg documentation. Normally, during the installation process, it will detect the installed CMake.

C:\Local\vcpkg> .\bootstrap-vcpkg.bat
C:\Local\vcpkg> .\vcpkg integrate install

Then, you can install the dependencies:

C:\Local\vcpkg> .\vcpkg install sdl2 freetype boost

Build and install

Back in the working directory, you can prepare the build of gf. Everything will be installed in the vcpkg hierarchy.

C:\Local> git clone
C:\Local> cd gf
C:\Local\gf> git submodule update --init
C:\Local\gf> mkdir build
C:\Local\gf> cd build
C:\Local\gf\build> cmake ../ -DCMAKE_TOOLCHAIN_FILE=C:\Local\vcpkg\scripts\buildsystems\vcpkg.cmake -DCMAKE_INSTALL_PREFIX=C:\Local\vcpkg\installed\x86-windows -DGF_BUILD_GAMES=ON -DGF_BUILD_TOOLS=ON

Finally, open Visual Studio. Then, open the gf solution located at C:\Local\gf\build\GF.sln. Then, choose "Release" and build the solution (F7). Finally, build the "INSTALL" project. gf is installed as well as its tools and games.