From 84bc32f2c2d3719f72e92f8202915956f8fc630b Mon Sep 17 00:00:00 2001 From: ek45 <15509988+ytlw@users.noreply.github.com> Date: Sat, 25 May 2024 20:08:11 +0800 Subject: [PATCH 1/2] support compilation at not-linux platform (#15) --- section1/preprocess.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/section1/preprocess.cpp b/section1/preprocess.cpp index bbf19f3..20c6c35 100644 --- a/section1/preprocess.cpp +++ b/section1/preprocess.cpp @@ -26,6 +26,8 @@ void case1() # #if __linux__ # define HAS_LINUX 1 +#else +# define HAS_LINUX 0 #endif # cout << "linux is " << HAS_LINUX << endl; From 3121dcc32e54d1b721762510fb602df5a035e20a Mon Sep 17 00:00:00 2001 From: ek45 <15509988+ytlw@users.noreply.github.com> Date: Mon, 27 May 2024 09:21:23 +0800 Subject: [PATCH 2/2] support compilation at mingw (#16) Co-authored-by: ytlw --- section1/oop.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/section1/oop.cpp b/section1/oop.cpp index 80b8267..9ad4968 100644 --- a/section1/oop.cpp +++ b/section1/oop.cpp @@ -9,6 +9,10 @@ #include #include +#if(defined (__MINGW64__) || (defined __MINGW32__)) +#include +#endif + #if 1 class Interface {};