From 60b0a335b0a8de4fea59ab2815a639d7b34bc1b5 Mon Sep 17 00:00:00 2001 From: jerrrrycho Date: Wed, 14 Oct 2026 21:58:30 +0200 Subject: [PATCH] test: stub basic_node::radius_() for GCC and Clang The Linux build failed to link the unit tests: undefined reference to scene::basic_node::radius_() from basic_node's vtable in engine_stubs.o. basic_node has no key function for the Itanium C++ ABI (tooltip() is declared plain but defined inline in the header), so GCC and Clang emit its vtable in every unit using scenenode.h, and the vtable needs radius_(), defined in scenenode.cpp, which the tests don't link. MSVC emits vtables differently, so the Windows build linked. Co-Authored-By: Claude Opus 5.5 --- tests/unit/engine_stubs.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unit/engine_stubs.cpp b/tests/unit/engine_stubs.cpp index abe5614a..4fe4ab12 100644 --- a/tests/unit/engine_stubs.cpp +++ b/tests/unit/engine_stubs.cpp @@ -68,4 +68,11 @@ layer_handle node_layers::close() { void node_layers::instance_begin(std::string const &, source_span const &) {} +// basic_node has no key function for the Itanium C++ ABI (tooltip() is declared plain but defined inline), so +// GCC and Clang emit its vtable wherever scenenode.h is used, here too, and the vtable wants radius_(). +// the same as the game's, in scene/scenenode.cpp +float basic_node::radius_() { + return 0.f; +} + } // namespace scene