Raspberry Pi (experimental)

TGUI 0.7 is no longer supported, use a newer TGUI version instead.

This guide is for compiling TGUI on the Raspberry Pi itself, I haven't tried cross-compilation yet.

Preparation

  • You will need to use CMake in order to build TGUI. If you have not yet installed it then do so now: “sudo apt-get install cmake”.
  • Also make sure that you already have sfml on your computer. It would be even better to make sure you have sfml working before trying to use TGUI. If something goes wrong afterwards, you can be sure that the problem does not lie with sfml.

Installing

Type the following in the terminal in order to install tgui. Of course you will have to be inside the downloaded tgui directory.

cmake .
make
sudo make install

Using TGUI (Terminal)

The two things to add is linking to tgui and tell the compiler that it uses c++11.

g++ -std=c++11 main.cpp -ltgui -lsfml-graphics -lsfml-window -lsfml-system -o program