From 544aa023b615af86b59100d1c274f0e700169a6e Mon Sep 17 00:00:00 2001 From: ringsaturn Date: Fri, 5 Jul 2019 14:27:15 +0800 Subject: [PATCH] Add patch for winmain.h bug on macOS fatal error: 'winmain.h' file not found https://github.com/taku910/crfpp/pull/15\#issuecomment-210193780 --- crf_learn.cpp | 2 ++ crf_test.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/crf_learn.cpp b/crf_learn.cpp index 8965ce6..444dd28 100644 --- a/crf_learn.cpp +++ b/crf_learn.cpp @@ -6,7 +6,9 @@ // Copyright(C) 2005-2007 Taku Kudo // #include "crfpp.h" +#ifdef _WIN32 #include "winmain.h" +#endif int main(int argc, char **argv) { return crfpp_learn(argc, argv); diff --git a/crf_test.cpp b/crf_test.cpp index 1d0ba26..97f85c4 100644 --- a/crf_test.cpp +++ b/crf_test.cpp @@ -6,7 +6,9 @@ // Copyright(C) 2005-2007 Taku Kudo // #include "crfpp.h" +#ifdef _WIN32 #include "winmain.h" +#endif int main(int argc, char **argv) { return crfpp_test(argc, argv);