From e5fea6de459e1b7c64b74f7061abee4401f5305d Mon Sep 17 00:00:00 2001 From: cardo Date: Sat, 2 May 2020 14:06:48 -0400 Subject: [PATCH 1/3] Enables compilation on MinGW --- src/app/exhaleApp.cpp | 3 +++ src/app/exhaleAppPch.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/app/exhaleApp.cpp b/src/app/exhaleApp.cpp index 482e794..edbf134 100644 --- a/src/app/exhaleApp.cpp +++ b/src/app/exhaleApp.cpp @@ -26,6 +26,9 @@ #include #if defined (_WIN32) || defined (WIN32) || defined (_WIN64) || defined (WIN64) #include +#ifdef __MINGW32__ +#include +#endif #define EXHALE_TEXT_BLUE (FOREGROUND_INTENSITY | FOREGROUND_BLUE | FOREGROUND_GREEN) #define EXHALE_TEXT_PINK (FOREGROUND_INTENSITY | FOREGROUND_BLUE | FOREGROUND_RED) diff --git a/src/app/exhaleAppPch.h b/src/app/exhaleAppPch.h index 713dc71..71aa7e7 100644 --- a/src/app/exhaleAppPch.h +++ b/src/app/exhaleAppPch.h @@ -40,8 +40,10 @@ # define __min(a, b) ((a) < (b) ? (a) : (b)) #endif #ifndef fprintf_s +#ifndef __MINGW32__ # define fprintf_s fprintf #endif +#endif // public sampling rate function bool isSamplingRateSupported (const unsigned samplingRate); -- GitLab From 1d28bbd420a97d2c8bca5087966a464f41ae354a Mon Sep 17 00:00:00 2001 From: moisesmcardona Date: Sat, 2 May 2020 16:28:50 -0400 Subject: [PATCH 2/3] Append CXXFLAGS to CPPFLAGS and ADDITIONAL_LDFLAGS to ALL_LDFLAGS --- src/makefile.base | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/makefile.base b/src/makefile.base index 6697ed0..f8a59d4 100644 --- a/src/makefile.base +++ b/src/makefile.base @@ -42,7 +42,7 @@ RELEASE_OBJS = $(OBJS:.o=.r.o) ## specification of compiler flags -CPPFLAGS = -fPIC $(DEFS) -I$(CURDIR)/$(DIR_INC) -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11 +CPPFLAGS = -fPIC $(DEFS) -I$(CURDIR)/$(DIR_INC) -Wall -Werror -Wshadow -D_FILE_OFFSET_BITS=64 -std=c++11 $(CXXFLAGS) # setting of 32-bit compiler flags MM32?=0 @@ -56,7 +56,7 @@ RELEASE_CPPFLAGS = -O3 -Wuninitialized ## specification of linker flags -ALL_LDFLAGS = -Wall +ALL_LDFLAGS = -Wall $(ADDITIONAL_LDFLAGS) # setting of 32-bit linker flags ifeq ($(MM32), 1) -- GitLab From e92ddefa42161bd062b6f915812663d00c16e694 Mon Sep 17 00:00:00 2001 From: cardo Date: Sat, 2 May 2020 16:37:52 -0400 Subject: [PATCH 3/3] Changed nested #ifndef to #if \!defined --- src/app/exhaleAppPch.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/exhaleAppPch.h b/src/app/exhaleAppPch.h index 71aa7e7..39474ce 100644 --- a/src/app/exhaleAppPch.h +++ b/src/app/exhaleAppPch.h @@ -39,11 +39,9 @@ #ifndef __min # define __min(a, b) ((a) < (b) ? (a) : (b)) #endif -#ifndef fprintf_s -#ifndef __MINGW32__ +#if !defined (fprintf_s) && !defined (__MINGW32__) # define fprintf_s fprintf #endif -#endif // public sampling rate function bool isSamplingRateSupported (const unsigned samplingRate); -- GitLab