-
Hi, I am using macOS and I was using the function It seems that the function is C++11, but I thought we were using already the C++11. Any ideas? Do we need to upgrade the linux setup with a newer version? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @amaroyo, C++11 is not enabled by default on Linux yet, or at least on certain flavors/versions of Linux; therefore, you have to explicitly tell CMake to compile the code with C++11 features enabled. There are multiple ways of doing this. If you have CMake 3.1, try the following directive: set(CMAKE_CXX_STANDARD 11) |
Beta Was this translation helpful? Give feedback.
-
C++11 (actually C++14) will be the default from GCC 6.1 (https://gcc.gnu.org/projects/cxx-status.html#cxx14). The first Ubuntu version with it I think is Ubuntu 16.10 . |
Beta Was this translation helpful? Give feedback.
Hi @amaroyo,
C++11 is not enabled by default on Linux yet, or at least on certain flavors/versions of Linux; therefore, you have to explicitly tell CMake to compile the code with C++11 features enabled.
There are multiple ways of doing this. If you have CMake 3.1, try the following directive:
set(CMAKE_CXX_STANDARD 11)