

dll) files to a new “lib” folder in the TGUI root directory. To make it easier to use tgui in your project, you should probably copy the. Once this is done, you will find the libraries inside the lib subdirectory of the build folder. Open the tgui.cbp file and hit “Build” to build the TGUI libraries.

CMake created a CodeBlocks project in the build directory that has to be build first. All you have to do now is press Generate. Now you should have reached the message “Configuring done” at the bottom. This option has to match with the one chosen for SFML.Īfter setting the options like you want them you need to press Configure again. You should also look at the TGUI_SHARED_LIBS option, check it to build dynamic libraries (.dll files), uncheck it to build static libraries. Set the CMAKE_BUILD_TYPE option either to “Debug” or to “Release” depending on the type of library you want. If you choose to build static libraries below then the folder must of course contain the static sfml libraries.You probably need to place the lib folder there yourself, with the libraries that you have build.If you use SFML_ROOT when you compiled sfml yourself then you will have to watch out for two things:

If SFML was not found then you should set SFML_DIR to the folder containing SFMLConfig.cmake (SFML >= 2.5) or alternatively set the SFML_ROOT variable to the root SFML folder (the directory that contains the include and lib folders).

If SFML cannot be found automatically you will receive an error. Just keep the “Use default native compilers” option checked and ignore the other three options. Next select your generator, when using CodeBlocks this is “CodeBlocks - MinGW Makefiles”. Set the location of the TGUI directory, set the build directory (usually a new empty folder) and press “Configure”. If something goes wrong afterwards, you can be sure that the problem does not lie with sfml. It would be even better to make sure you have sfml working before trying to use TGUI. Also make sure that you already have sfml on your computer.You can download the latest version here. You will need to use CMake in order to build TGUI.
