From a88a4ad9924595f3c32722de43420cb7eb4843ee Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Wed, 5 Jun 2013 03:29:34 +0200 Subject: [PATCH] FIXED: GUI not showing up because of the interface user functions not getting registered, because of a file linking issue. --- code/nel/src/gui/interface_expr.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/code/nel/src/gui/interface_expr.cpp b/code/nel/src/gui/interface_expr.cpp index 90714e8d5..cbf3cace3 100644 --- a/code/nel/src/gui/interface_expr.cpp +++ b/code/nel/src/gui/interface_expr.cpp @@ -28,6 +28,21 @@ using namespace NLMISC; namespace NLGUI { + void ifexprufct_forcelink(); + + // Needed because otherwise GCC and co. omit the code in interface_expr_user_fct.cpp code + // causing the GUI not to work. + // It all happens because no function is called *directly* from that module. + struct LinkTrickster + { + LinkTrickster() + { + ifexprufct_forcelink(); + } + }; + + LinkTrickster linkTrickster; + // Yoyo: Act like a singleton, else registerUserFct may crash. CInterfaceExpr::TUserFctMap *CInterfaceExpr::_UserFct= NULL;