From a3cf8dca335f4a364a84c6144d4747c2429575a4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 31 Dec 2007 10:32:21 +0000 Subject: [PATCH] ensure that gsockmsw.obj is linked in, it was optimized away by MSVC linker resulting in socket manager not being initialized git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/gsocket.cpp | 3 +++ src/msw/gsockmsw.cpp | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/msw/gsocket.cpp b/src/msw/gsocket.cpp index 18d83b0434..2830549071 100644 --- a/src/msw/gsocket.cpp +++ b/src/msw/gsocket.cpp @@ -58,6 +58,9 @@ #if wxUSE_SOCKETS #include "wx/gsocket.h" +#include "wx/link.h" + +wxFORCE_LINK_MODULE(gsockmsw) #ifdef __WXWINCE__ #ifndef isdigit diff --git a/src/msw/gsockmsw.cpp b/src/msw/gsockmsw.cpp index 79969ac301..489feff570 100644 --- a/src/msw/gsockmsw.cpp +++ b/src/msw/gsockmsw.cpp @@ -38,6 +38,9 @@ #include "wx/gsocket.h" #include "wx/apptrait.h" +#include "wx/link.h" + +wxFORCE_LINK_THIS_MODULE(gsockmsw) extern "C" WXDLLIMPEXP_BASE HINSTANCE wxGetInstance(); #define INSTANCE wxGetInstance() @@ -470,6 +473,6 @@ static struct ManagerSetter static GSocketMSWManager s_manager; wxAppTraits::SetDefaultSocketManager(&s_manager); } -} gsm_managerSetter; +} gs_managerSetter; #endif // wxUSE_SOCKETS -- 2.45.2