You can download the source code from the download page and follow the ‘building with CMake’ tutorial for a guide on how to build TGUI.
After you ran
make like explained in the tutorial, you should call
sudo make install to install the libraries which you just built.
To link to the TGUI libraries you only need to add
-ltgui to your compiler command.
For GCC < 6 you will also need to specify
g++ -std=c++14 main.cpp -ltgui -lsfml-graphics -lsfml-window -lsfml-system -o program
Open the “Project build options” and choose whether you want to change Debug or Release target settings. You can click on the name of your project (here TGUI-Test) and set settings that apply to both Debug and Release.
If you get the following error when running your program then you did install TGUI correctly, but it is not in the shared library cache.
/pathname/of/program: error while loading shared libraries: libtgui.so: cannot open shared object file: no such file or directory
Try to open the terminal and execute
If that doesn’t solve it then make sure the library was installed to a place where your linux distro searches for it.
The easiest workaround is probably to add a new line containing
/usr/local/lib/ (and nothing more) at the end of /etc/ld.so.conf and then run
sudo ldconfig again.