Hi all,
When trying to compile the host code using <make> command in MobaXterm terminal. I got this error. I am not sure what to do to fix this error. I need help
In file included from /usr/include/c++/4.8.2/array:35:0,
from host/src/host.cpp:16:
/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 \
^
The solution is in the message. You are using C++11 and this must be enabled in your compiler. C++11 is a new C++ standard that came out in 2011. So something like this:
gcc -std=c++11 ...
Edit: don’t know your Makefile that you are using. It’s probably in CFLAGS in the Makefile. Do something like append the -std=c++11