![]() |
Gamedev Framework (gf)
0.16.0
A C++14 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++14 compiler. The minimum version of supported compilers are given in the following table.
Compiler | Version | Reference |
---|---|---|
GCC | 5 | C++14 Support in GCC |
Clang | 3.4 | C++14 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.2 | zlib/libpng |
Boost Filesystem | 1.55 | Boost |
Boost String Algorithms | 1.55 | Boost |
Boost Heap | 1.55 | Boost |
Freetype | 2.5.2 | Freetype |
zlib | 1.2.8 | zlib/libpng |
Tools:
Name | Version |
---|---|
CMake | 3.0.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 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.
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:
Then, you have to follow the instructions from the vcpkg documentation. Normally, during the installation process, it will detect the installed CMake.
Then, you can install the dependencies:
Back in the working directory, you can prepare the build of gf. Everything will be installed in the vcpkg hierarchy.
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.