From 8aa2a112b40fd29dca70cdb0fe8a6dd66fa5b798 Mon Sep 17 00:00:00 2001 From: Sergio Valor Date: Sun, 19 Oct 2025 09:00:01 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Enlazar=20SDL3=5Fttf=20en=20Makefile=20+?= =?UTF-8?q?=20corregir=20declaraci=C3=B3n=20SDL=5FRenderer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Problema 1: Símbolos no definidos de SDL_ttf** (CRÍTICO) - Error: "Undefined symbols: _TTF_Init, _TTF_OpenFont, etc." - Causa: LDFLAGS solo incluía -lSDL3 (faltaba -lSDL3_ttf) - Solución: Añadido -lSDL3_ttf a LDFLAGS para Unix/macOS (línea 81) - Afecta: Linux, macOS y otros sistemas Unix **Problema 2: Mismatch class/struct SDL_Renderer** (WARNING) - Warning: "class 'SDL_Renderer' was previously declared as a struct" - Causa: ui_manager.h:7 declaraba "class SDL_Renderer" - SDL3 lo declara como "struct SDL_Renderer" (SDL_render.h:119) - Solución: Cambiado class → struct en ui_manager.h:7 - Evita warnings y potenciales errores de linker en MSVC **Resultado:** ✅ make macos_release completa exitosamente ✅ DMG creado: vibe3_physics-2025-10-19-macos-apple-silicon.dmg (17.9 MB) ✅ Sin errores de enlazado, solo warnings menores de versión macOS 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Makefile | 2 +- source/ui/ui_manager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6e01cf5..8b8bd1b 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ else FixPath = $1 CXXFLAGS := -std=c++20 -Wall -Os -ffunction-sections -fdata-sections CXXFLAGS_DEBUG := -std=c++20 -Wall -g -D_DEBUG - LDFLAGS := -lSDL3 + LDFLAGS := -lSDL3 -lSDL3_ttf RMFILE := rm -f RMDIR := rm -rdf MKDIR := mkdir -p diff --git a/source/ui/ui_manager.h b/source/ui/ui_manager.h index 7eb25d8..9d6c353 100644 --- a/source/ui/ui_manager.h +++ b/source/ui/ui_manager.h @@ -4,7 +4,7 @@ #include // for std::string // Forward declarations -class SDL_Renderer; +struct SDL_Renderer; class SceneManager; class Shape; class ThemeManager;