aboutsummaryrefslogtreecommitdiff
path: root/computer-network-experiment/Common.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-06 22:13:43 +0800
committercrupest <crupest@outlook.com>2021-06-06 22:13:43 +0800
commita6088689ec605c97b846fb52beadc0de89fccf76 (patch)
tree43f2f4b328a0750ee7f56df13e7c340ea67dd49b /computer-network-experiment/Common.cpp
parent27f3043a55e97c13eb586cf71a3d50cf48f67aca (diff)
downloadlife-a6088689ec605c97b846fb52beadc0de89fccf76.tar.gz
life-a6088689ec605c97b846fb52beadc0de89fccf76.tar.bz2
life-a6088689ec605c97b846fb52beadc0de89fccf76.zip
...
Diffstat (limited to 'computer-network-experiment/Common.cpp')
-rw-r--r--computer-network-experiment/Common.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/computer-network-experiment/Common.cpp b/computer-network-experiment/Common.cpp
index 02ac550..2e01dcb 100644
--- a/computer-network-experiment/Common.cpp
+++ b/computer-network-experiment/Common.cpp
@@ -5,7 +5,6 @@
#ifdef WIN32
#include <Windows.h>
#include <winsock.h>
-#pragma comment(lib, "Ws2_32.lib")
#endif
[[noreturn]] void PrintErrorMessageAndExit(StringView message,
@@ -46,3 +45,17 @@ void InitWSA() {
}
}
#endif
+
+int main() {
+#ifdef WIN32
+ InitWSA();
+#endif
+
+ int c = Main();
+
+#ifdef WIN32
+ WSACleanup();
+#endif
+
+ return c;
+}