![]() |
Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
|
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 a conformant C++17 compiler. The minimum version of supported compilers are given in the following table.
Compiler | Version | Reference |
---|---|---|
GCC | 8 | C++17 Support in GCC |
Clang | 5 | C++17 implementation status |
MSVC | VS 2017 | Visual C++ Language Conformance |
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.
Libraries:
Name | Version | License |
---|---|---|
SDL2 | 2.0.8 | zlib/libpng |
Boost String Algorithms | 1.65 | Boost |
Boost Heap | 1.65 | Boost |
Freetype | 2.9.1 | Freetype |
zlib | 1.2.11 | zlib/libpng |
pugixml | 1.8.1 | MIT |
Tools:
Name | Version |
---|---|
CMake | 3.10.2 |
This section assumes you have a working compiler, either gcc or clang, and git.
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:
For Archlinux:
For Fedora/Red Hat/CentOS:
First, build:
Then install:
This section assumes you are using at least Visual Studio Community 2017. You also need git for Windows and vcpkg. Finally, the working directory where everything will be installed is set to C:\Local\
. You can choose whatever directory you want.
First, you have to install vcpkg from its git repository. From a command line, in the working directory:
Then, you have to follow the instructions from the vcpkg documentation. Normally, during the installation process, it will install CMake.
Then, you can install the gf package: