1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 <2023> 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 <2023> 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: C++ std problem |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | Mark Rivers <rivers at cars.uchicago.edu>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Tue, 13 Jun 2023 17:55:02 +0000 |
I should add that ADPICam.cpp compiles fine on Centos 8 Stream (gcc 8.5.0).
I have compiled other files that use std::unordered_map on gcc 4.8.5 without problems, for example the EPICS Galil motor controller. Thanks, Mark From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Mark Rivers via Tech-talk I am trying to build areaDetector/ADPICam on Centos 7 (gcc 4.8.5). It uses std::unordered_map which I believe was added in C++11. If I compile without this line in the Makefile USR_CXXFLAGS_Linux += -std=c++11 then I get this error, which is expected because it is not using C++11. /usr/bin/g++ -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_ -DUNIX -Dlinux -O3 -g -Wall -mtune=generic
-m64 -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/corvette/home/epics/devel/asyn-4-43/include -I/corvette/home/epics/devel/areaDetector-3-12-1/ADSupport/include/os/Linux -I/corvette/home/epics/devel/areaDetector-3-12-1/ADSupport/include
-I/corvette/home/epics/devel/areaDetector-3-12-1/ADCore/include -I/corvette/usr/local/epics-devel/base-7.0.7/include/compiler/gcc -I/corvette/usr/local/epics-devel/base-7.0.7/include/os/Linux -I/corvette/usr/local/epics-devel/base-7.0.7/include -c ../ADPICam.cpp In file included from /usr/include/c++/4.8.2/unordered_map:35:0, from ../ADPICam.h:16, from ../ADPICam.cpp:19: /usr/include/c++/4.8.2/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO
C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support for the \ ^ In file included from ../ADPICam.cpp:19:0: ../ADPICam.h:546:33: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11 [enabled
by default] bool imageThreadKeepAlive = true; ^ ../ADPICam.h:553:5: error: 'unordered_map' in namespace 'std' does not name a type std::unordered_map<PicamParameter, int> parameterExistsMap; If I use the c++11 flag then I get this error:
Can anyone explain what that error means, and is it possible to use gcc 4.8.5 to compile this file? Mark |