FAQ – Frequently Asked Questions

General

Why aren't there precompiled libraries available for download?

In the past (prior version 0.2.0) this website provided precompiled binaries. However, starting with the massive C++11 changes we did in the codebase, it got harder to maintain those binaries for all possible setups (multiple GCC versions, multiple VC++ versions, multiple Clang versions, multiple MinGW versions, multiple operating systems etc.).

Besides of that, we think that developers who want to try out SFGUI will have no difficulties building the library.

Why isn't there support for older Visual Studio/GCC/whatever versions?

SFGUI makes use of modern C++11 features, such as range-based for loops, std::function, std::bind, move semantics and many more. If you're using a compiler that does not yet support those features, you won't be able to use SFGUI. Please upgrade your toolchain.

Can SFGUI be used with SDL or other libraries/frameworks?

That's not (yet) possible. We plan to decouple SFGUI from SFML however. When that happens, you will be able to use SFGUI in any OpenGL application.

What's sfg::SFGUI for?

See the Hello World chapter in the user guide.

Building

CMake can't find FindSFML.cmake.

Since SFGUI 0.3.0 the FindSFML.cmake file is provided with SFGUI's source code as well. If that file is missing, you're either using an old version of SFGUI or your Git clone might have failed.

CMake can't find SFML

Set the CMake variable SFML_ROOT to the path where you've installed SFML.

CMake can't find GLEW

Since SFGUI 0.3.0 GLEW isn't used anymore, make sure to upgrade SFGUI.

Can I build a static version of SFGUI?

As explained in the Installing chapter of the user guide (section Build options), simply set SFGUI_BUILD_SHARED_LIBS to FALSE. When using a static SFGUI library in your project, make sure to define the macro SFGUI_STATIC in your project.

There are errors when I try to use my static SFGUI build.

Make sure to define the macro SFGUI_STATIC in your project. Additionally make sure to link against all of SFGUI's dependencies.

Can I link SFML statically into SFGUI?

Yes, set SFML_STATIC_LIBRARIES to TRUE.

Widgets

Why is widget XY missing?

We only implement widgets that we need ourselves. SFGUI is a non-profit open source project. We are happy if people contribute to the project.

How can I style widgets?

You can either use the function SetProperty() of sfg::Desktop or load a theme file using LoadThemeFromFile() (also in sfg::Desktop).

Read the style reference to see what properties exist and the API reference to lookup the mentioned functions to see how they work.

Can textures/skins be used on widgets?

Unfortunately that's not yet possible. The renderer used in SFGUI only allows to render shapes. However a bitmap renderer which will allow any texture to be used as a skin is already planned.