From 328f50211f6fa4e353e57cca3524ba91f7c3f62c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 17 Aug 2026 22:07:24 +0200 Subject: [PATCH] Link TracyImGui library with libdl. ImGui OpenGL loader uses dlopen / dlsym / dlclose to load the OpenGL implementation. Linking with libdl is not needed with glibc >= 2.34 (released in 2021): NEWS for version 2.34 ===================== Major new features: * In order to support smoother in-place-upgrades and to simplify the implementation of the runtime all functionality formerly implemented in the libraries libpthread, libdl, libutil, libanl has been integrated into libc. New applications do not need to link with -lpthread, -ldl, -lutil, -lanl anymore. (...) Older glibc versions and also possibly other libc implementations still need the libdl link. --- cmake/vendor.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/vendor.cmake b/cmake/vendor.cmake index 90d16807..78003027 100644 --- a/cmake/vendor.cmake +++ b/cmake/vendor.cmake @@ -197,7 +197,10 @@ if(VENDOR_GUI) add_library(TracyImGui STATIC EXCLUDE_FROM_ALL ${IMGUI_SOURCES}) target_include_directories(TracyImGui PUBLIC ${ImGui_SOURCE_DIR}) - target_link_libraries(TracyImGui PUBLIC TracyFreetype) + target_link_libraries(TracyImGui PUBLIC + TracyFreetype + ${CMAKE_DL_LIBS} + ) target_compile_definitions(TracyImGui PRIVATE "IMGUI_ENABLE_FREETYPE") target_compile_definitions(TracyImGui PUBLIC "IMGUI_USE_WCHAR32") #target_compile_definitions(TracyImGui PUBLIC "IMGUI_DISABLE_OBSOLETE_FUNCTIONS")