diff options
author | crupest <crupest@outlook.com> | 2021-06-06 22:13:43 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-06 22:13:43 +0800 |
commit | a6088689ec605c97b846fb52beadc0de89fccf76 (patch) | |
tree | 43f2f4b328a0750ee7f56df13e7c340ea67dd49b /computer-network-experiment/Common.cpp | |
parent | 27f3043a55e97c13eb586cf71a3d50cf48f67aca (diff) | |
download | life-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.cpp | 15 |
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;
+}
|