Skip to content

GCC version for C++11 #229

Answered by pattacini
amaroyo asked this question in Q&A
Discussion options

You must be logged in to vote

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)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pattacini
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #229 on December 15, 2020 15:32.