CodeBlocks (precompiled libs)

You MUST use the official sfml 2.3 libraries with the precompiled tgui version! If you use another SFML version, then you will have to recompile TGUI.

Using TGUI

Open the “Project build options” and choose whether you want to change debug or release target settings. Or you can just click on the name of your project (here TGUI_Test) and set them for both.

CodeBlocks Project Build Options

In the “Search directories” of the “Compiler” add the path to tgui.

CodeBlocks Search Directories Compiler

In the “Search directories” of the “Linker” add the path to the tgui libraries.

CodeBlocks Search Directories Linker

In ‘Release’ settings, add ‘-ltgui’ to the “Linker settings” under “Other linker options”.
In ‘Debug’ settings, add ‘-ltgui-d’ to the “Linker settings” under “Other linker options”.
When linking statically, you have to use ‘-ltgui-s’ and ‘-ltgui-s-d’ of course.
The order of linking has to be correct: first tgui, then the libraries from sfml, namely graphics, windows and system.

CodeBlocks Linker Settings

You must also enable c++11.
If you have an older compiler version and don’t have the “-std=c++11″ option, then use “-std=c++0x” instead.

CodeBlocks Compiler Flags

When using shared libraries, don't forget to copy tgui.dll to your project’s folder.

You should now be able to use TGUI.