Error: #error This file requires compiler and library support for the ISO C++ 2011 standard
0
votes
1
answer
2202
views
I am running a c++ code with TAU (analyzing and profiling tool) on Ubuntu 20.04 LTS using some cluster. The command I am running looks like this:
tau_cxx.sh -I$FFTW3_INC wrappingScript.cpp spectralFunctions.cpp arithmeticFunctions.cpp -optLinking="-lfftw3 -lm -g" -o ../../Datasim/TauTest.out
This however is giving me the following error:
Executing> /opt/apps/gcc/5.2.0/bin/g++ -I/opt/apps/gcc5_2/mvapich22_2/fftw/3.3.8/include wrappingScript.cpp spectralFunctions.cpp arithmeticFunctions.cpp -o ../../Datasim/TauTest.out
In file included from /arcapps/cascades-broadwell-slurm/opt/apps/gcc/5.2.0/include/c++/5.2.0/cstdint:35:0,
from arithmeticFunctions.cpp:8:
/arcapps/cascades-broadwell-slurm/opt/apps/gcc/5.2.0/include/c++/5.2.0/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 \
^
make: *** [all] Error 1
So I tried compiling with `-std=c++11
` like this:
tau_cxx.sh -I$FFTW3_INC -std=c++11 wrappingScript.cpp spectralFunctions.cpp arithmeticFunctions.cpp -optLinking="-lfftw3 -lm -g" -o ../../Datasim/TauTest.out
This somehow messes up my `-I$FFTW3_INC
` and I get errors like:
undefined reference to `fftw_malloc'
I tried also linking it in my TAU options like:
tau_cxx.sh -I$FFTW3_INC wrappingScript.cpp spectralFunctions.cpp arithmeticFunctions.cpp -optLinking="-lfftw3 -lm -std=c++11 -g" -o ../../Datasim/TauTest.out
This had no effect and gave me the original error. Can someone help please I am confused.
Asked by Jamie
(111 rep)
May 27, 2021, 10:00 PM
Last activity: Jul 12, 2025, 01:00 AM
Last activity: Jul 12, 2025, 01:00 AM