It looks like the .pro file should add: CONFIG += c++11 (at a
minimum, or possibly c++14 or c++17). See
https://wiki.qt.io/How_to_use_C%2B%2B11_in_your_Qt_Projects and
https://stackoverflow.com/questions/19398438/c-qt-how-to-add-std-c11-to-the-makefile-which-is-generated-by-qmake
for example. Can you try that and share whether it fixes the
issue for you?
GCC 4.8.2 is more than seven years old at this point -- roughly
the era of gnuplot 4.6. Any non-ancient version of GCC defaults
to -std=c++14 if unspecified, so this will only affect a select
few people, like yourself, building gnuplot on old systems.
Kevin Klein <kk...@gm...> said (on 2020/09/04):
> Date: Fri, 4 Sep 2020 12:17:07 -0500
> From: Kevin Klein <kk...@gm...>
> To: gnu...@li...
> Subject: [Gnuplot-info] appending to default Makefile variable value
>
> When running "make" while trying to build gnuplot on RHEL7, I initially
> received the following error:
>
> In file included from /usr/include/c++/4.8.2/type_traits:35:0,
> from /usr/include/qt5/QtCore/qglobal.h:45,
> from /usr/include/qt5/QtCore/QtCore:4,
> from qterminal/qt_term.cpp:51:
> /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.
>
> Based on the above message, "-std=c++11" needed to be added to the
> QT_CFLAGS variable that is generated in the Makefile. Ultimately I did
> this by looking at the default value for this variable in config.log, then
> running the following in the shell:
>
> setenv QT_CFLAGS '-std=c++11 <QT_CFLAGS>'
>
> where <QT_CFLAGS> is the default value for QT_CFLAGS as listed in
> config.log, then re-running configure. This generated a Makefile with
> QT_CFLAGS set to its default value plus " -std=c++11", which then allowed
> the "make" (and "make install") to complete successfully.
>
> My question is:
>
> Is there a simple one-liner way to specify that something should be
> appended to the QT_CFLAGS variable when configure is run rather than
> replacing it? If I had run the following in the shell:
>
> setenv QT_CFLAGS -std=c++11
>
> And then run configure, the resulting Makefile would only contain
> "-std=c++11" as the value for QT_CFLAGS rather than that plus all of the
> default library include paths, and "make" would have failed.
|