From 4c280dc6e91679cfeb9496a0bff82408f8316c5d Mon Sep 17 00:00:00 2001 From: Rob Swindell <rob@synchro.net> Date: Mon, 8 Mar 2021 11:09:06 -0800 Subject: [PATCH] Add -std=c++11 for .cpp builds Hope to address error reported by rjwboys via IRC when using gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.12) from ansiterm.cpp:22 /user/include/c++/5/bits/c++0x_warning.h:32:2 error #error this file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options. --- src/build/Common.gmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/build/Common.gmake b/src/build/Common.gmake index 71b5f0d0d8..b03a107506 100644 --- a/src/build/Common.gmake +++ b/src/build/Common.gmake @@ -448,7 +448,7 @@ $(OBJODIR)/%$(OFILE) : %.c $(BUILD_DEPENDS) | $(OBJODIR) # Implicit C++ Compile Rule $(OBJODIR)/%$(OFILE) : %.cpp $(BUILD_DEPENDS) | $(OBJODIR) @echo $(COMPILE_MSG) $< - $(QUIET)$(CXX) $(CFLAGS) $(CXXFLAGS) -o $@ -c $< + $(QUIET)$(CXX) -std=c++11 $(CFLAGS) $(CXXFLAGS) -o $@ -c $< # Implicit MT C Compile Rule $(MTOBJODIR)/%$(OFILE) : %.c $(BUILD_DEPENDS) | $(MTOBJODIR) @@ -458,7 +458,7 @@ $(MTOBJODIR)/%$(OFILE) : %.c $(BUILD_DEPENDS) | $(MTOBJODIR) # Implicit MT C++ Compile Rule $(MTOBJODIR)/%$(OFILE) : %.cpp $(BUILD_DEPENDS) | $(MTOBJODIR) @echo $(COMPILE_MSG) $< - $(QUIET)$(CXX) $(CFLAGS) $(CXXFLAGS) $(MT_CFLAGS) -o $@ -c $< + $(QUIET)$(CXX) -std=c++11 $(CFLAGS) $(CXXFLAGS) $(MT_CFLAGS) -o $@ -c $< depend: $(QUIET)$(DELETE) $(OBJODIR)/.depend -- GitLab