Main Menu

Recent posts

#1
Installation help / Re: TGUI Builder via vcpkg
Last post by GoverNator - 08 February 2026, 22:38:23
Whoa
Thank's a lot, it did helped!

For anyone else coming to the topic with same question: specifying the "tool" feature would enable gui builder.

{
  "dependencies": [
    "sfml",
    {
      "name": "tgui",
      "default-features": true,
      "features": ["tool"]
    },
    "vcpkg-cmake"
  ]
}

It would be built if your project contains the release configuration, and .exe with all the dependencies and resource files would be put into \vcpkg_installed\x64-windows\tools\tgui
#2
Installation help / Re: TGUI Builder via vcpkg
Last post by texus - 08 February 2026, 22:04:50
I don't know much about the vcpkg package (someone else maintains it), I do however know that the vcpkg package should contain an optional "tool" feature that is linked to the TGUI_BUILD_GUI_BUILDER option (https://github.com/microsoft/vcpkg/blob/master/ports/tgui/portfile.cmake#L39).
So if you know or look up how to enable package features in vcpkg then you might be able to get the Gui Builder by installing that "tool" feature in the "tgui" package.
#3
Installation help / TGUI Builder via vcpkg
Last post by GoverNator - 08 February 2026, 20:44:30
Hello

I've gave vcpkg a try, since it's not very productive to install everything manually all the time. Getting TGUI, SFML, compile and run was ok for "hello world".

I wonder is it possible to get also the Gui builder with the vcpkg? I've tried smth like the example below, but nothing worked. Also I found no related keywords by searching TGUI package files, downloaded from vcpkg.

#vcpkg_cmake_configure(
#    OPTIONS
#        -DTGUI_BUILD_GUI_BUILDER:BOOL=ON
#)
set(VCPKG_CMAKE_CONFIGURE_OPTIONS -DTGUI_BUILD_GUI_BUILDER:BOOL=ON)


#4
Installation help / Re: TGUI MSVC linker errors
Last post by texus - 14 January 2026, 23:49:44
No worries, you aren't wasting my time, I'm happy to help.
The nightly builds should also be stable (and I even tested it here with the latest version), so I don't see why it wouldn't work.

It's a good thing that you managed to get it to work now though, because I wouldn't actually have time in the next week to dig further into the issue. So unless someone else runs into the same issue or you get it again in the future when upgrading, I'm just going to pretend that this was a one-off temporary issue that needs no further investigation.
#5
Installation help / Re: TGUI MSVC linker errors
Last post by nikodev - 14 January 2026, 21:30:44
I made a brand new Visual Studio project and used your code to test. It crashes for the same reason..
-I am linking statically
-TGUI nightly build
-I built TGUI and raylib myself

..But afterwards I tested TGUI stable and I had no issues.
Sorry for wasting your time.
#6
Installation help / Re: TGUI MSVC linker errors
Last post by texus - 14 January 2026, 20:23:52
That doesn't make much sense.

Can you verify that a program with just the following code still crashes?
Code (cpp) Select
#define NOGDI
#define NOUSER
#include <raylib.h>
#include <TGUI/TGUI.hpp>
#include <TGUI/Backend/raylib.hpp>

void run_application()
{
    tgui::Gui gui;

    auto menu = tgui::MenuBar::create();
    menu->addMenu("File");
    menu->addMenuItem("New Project");
    menu->connectMenuItem({ "File", "New Project" }, [] {
        std::cout << "Let me print! \n";
        });
    gui.add(menu, "menu1");

    gui.mainLoop();
}

int main()
{
    SetTraceLogLevel(LOG_WARNING);

    InitWindow(800, 600, "TGUI example (RAYLIB)");
    SetTargetFPS(30);

    run_application();

    CloseWindow();
}

- Are you linking statically or dynamically to raylib?
- What TGUI and raylib version are you using?
- Are you using precompiled builds or did you build TGUI and/or raylib yourself?
#7
Installation help / Re: TGUI MSVC linker errors
Last post by nikodev - 14 January 2026, 17:23:01
Exception thrown: read access violation.
this->_Vec._Mypair._Myval2._Myfirst was 0x111277529122129.

Minimal code with small menu:
auto menu = tgui::MenuBar::create();
  menu->addMenu("File");
  menu->addMenuItem("New Project");

 
  menu->connectMenuItem({"File", "New Project"}, [] {
    std::cout << "Let me print! \n";
  });
 

  gui->add(menu, "menu1");

It runs when menu item is not connected, otherwise there is a read access violation.
#8
Installation help / Re: TGUI MSVC linker errors
Last post by texus - 14 January 2026, 17:03:20
Is the access violation giving you an address where it is reading from, and is that address near 0? If that would be the case, is there a chance that the menu bar on which you are calling connectMenuItem hasn't been initialized yet?

If that isn't the problem then could you perhaps share some minimal code that reproduces the issue?
#9
Installation help / Re: TGUI MSVC linker errors
Last post by nikodev - 14 January 2026, 15:45:05
Okay, now I did add TGUI_STATIC define, but it appears I get a runtime access violation when connectMenuItem method of MenuBar is invoked.  ??? 

Call stack:
editor.exe!std::_Hash<std::_Umap_traits<unsigned int,std::function<void __cdecl(void)>,std::_Uhash_compare<unsigned int,std::hash<unsigned int>,std::equal_to<unsigned int>>,std::allocator<std::pair<unsigned int const ,std::function<void __cdecl(void)>>>,0>>::_Find_last<unsigned int>(const unsigned int & _Keyval, const unsigned __int64 _Hashval) Line 1586 (c:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\include\xhash:1586)
editor.exe!std::_Hash<std::_Umap_traits<unsigned int,std::function<void __cdecl(void)>,std::_Uhash_compare<unsigned int,std::hash<unsigned int>,std::equal_to<unsigned int>>,std::allocator<std::pair<unsigned int const ,std::function<void __cdecl(void)>>>,0>>::_Try_emplace<unsigned int const &>(const unsigned int & _Keyval_arg) Line 700 (c:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\include\xhash:700)
editor.exe!std::unordered_map<unsigned int,std::function<void __cdecl(void)>,std::hash<unsigned int>,std::equal_to<unsigned int>,std::allocator<std::pair<unsigned int const ,std::function<void __cdecl(void)>>>>::operator[](const unsigned int & _Keyval) Line 433 (c:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\include\unordered_map:433)
editor.exe!tgui::Signal::connect<void <lambda>(void),0>(const tgui::SignalItemHierarchy::connect::__l2::void <lambda>(void) & func) Line 128 (c:\Users\Kaloyan\Documents\Projects\rpgpp\include\TGUI\Signal.hpp:128)
editor.exe!tgui::SignalItemHierarchy::connect<void <lambda>(const std::vector<tgui::String,std::allocator<tgui::String>> &),0>(const tgui::MenuBar::connectMenuItem::__l2::void <lambda>(const std::vector<tgui::String,std::allocator<tgui::String>> &) & func) Line 1122 (c:\Users\Kaloyan\Documents\Projects\rpgpp\include\TGUI\Signal.hpp:1122)
editor.exe!tgui::MenuBar::connectMenuItem<void <lambda>(void)>(const std::vector<tgui::String,std::allocator<tgui::String>> & hierarchy, EditorInterfaceService::{ctor}::__l2::void <lambda>(void) && handler) Line 122 (c:\Users\Kaloyan\Documents\Projects\rpgpp\include\TGUI\Widgets\MenuBar.hpp:122)
editor.exe!EditorInterfaceService::EditorInterfaceService() Line 41 (c:\Users\Kaloyan\Documents\Projects\rpgpp\src\editor\editorInterfaceService.cpp:41)
editor.exe!std::make_unique<EditorInterfaceService,0>() Line 3659 (c:\Program Files\Microsoft Visual Studio\18\Community\VC\Tools\MSVC\14.50.35717\include\memory:3659)
editor.exe!Editor::init() Line 24 (c:\Users\Kaloyan\Documents\Projects\rpgpp\src\editor\editor.cpp:24)
editor.exe!run_app() Line 17 (c:\Users\Kaloyan\Documents\Projects\rpgpp\src\editor\main.cpp:17)
editor.exe!main() Line 61 (c:\Users\Kaloyan\Documents\Projects\rpgpp\src\editor\main.cpp:61)
editor.exe!invoke_main() Line 79 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79)
editor.exe!__scrt_common_main_seh() Line 288 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
editor.exe!__scrt_common_main() Line 331 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
editor.exe!mainCRTStartup(void * __formal) Line 17 (d:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
kernel32.dll!00007ffae012e8d7() (Unknown Source:0)
ntdll.dll!00007ffae0d4c53c() (Unknown Source:0)
#10
Installation help / Re: TGUI MSVC linker errors
Last post by texus - 14 January 2026, 15:23:59
Did you add TGUI_STATIC to your preprocessor definitions?
It has to be defined when linking statically, otherwise the linker will search for these symbols in loaded DLL files instead of in the static library.