From ad84a60912482f348484acfd95a17649a5f677dc Mon Sep 17 00:00:00 2001 From: otavepto <153766569+otavepto@users.noreply.github.com> Date: Sun, 2 Jun 2024 09:11:06 +0300 Subject: [PATCH] properly declare then define the damn export `g_pSteamClientGameServer`, microsoft's compiler is dubious --- dll/dll.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/dll.cpp b/dll/dll.cpp index 8a3c2279..52992529 100644 --- a/dll/dll.cpp +++ b/dll/dll.cpp @@ -161,11 +161,11 @@ STEAMAPI_API HSteamUser SteamAPI_GetHSteamUser() return CLIENT_HSTEAMUSER; } -#ifdef STEAMCLIENT_DLL // client -ISteamClient *g_pSteamClientGameServer{}; -#else // api +// declare "g_pSteamClientGameServer" as an export for API library, then actually define it +#if !defined(STEAMCLIENT_DLL) // api STEAMAPI_API ISteamClient *g_pSteamClientGameServer; #endif +ISteamClient *g_pSteamClientGameServer{}; static Steam_Client *steamclient_instance{}; Steam_Client *get_steam_client()