From ae8ee89b0f63bdf1f04bdfd9698c92647c277602 Mon Sep 17 00:00:00 2001 From: Purple <38256064+IamSanjid@users.noreply.github.com> Date: Tue, 28 Apr 2020 22:44:01 +0600 Subject: [PATCH] Fixing `closesocket` linking error. Whenever I tried to use this Socket class, I get the linking error which says `closesocket` is unresolved. I am not sure this is how it should be done but after specifying the lib, it solved the issue. --- BeefLibs/corlib/src/Net/Socket.bf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeefLibs/corlib/src/Net/Socket.bf b/BeefLibs/corlib/src/Net/Socket.bf index 9373b529..7e600a03 100644 --- a/BeefLibs/corlib/src/Net/Socket.bf +++ b/BeefLibs/corlib/src/Net/Socket.bf @@ -148,7 +148,7 @@ namespace System.Net static extern int32 connect(HSocket s, SockAddr* name, int32 nameLen); #if BF_PLATFORM_WINDOWS - [CLink, StdCall] + [Import("wsock32.lib"), CLink, StdCall] static extern int32 closesocket(HSocket s); #else [CLink, StdCall]