Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c++: error: unrecognized command line option ‘-std=c++14’

I just moved my PC from Ubuntu 15.10 to Linux Mint 17.3.

Before this shift, this project compiled just fine in CLion. Now, it gives the following error:

c++: error: unrecognized command line option ‘-std=c++14’

This is probably due to this line in my CMake file:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -W -Wall -Wextra -pedantic")

I suspect this error is due to some outdated library/compiler. I don't know exactly what I need to do.

P.S.: I know that C++14 is not completely supported in CLion, and the editor will complain about syntax errors, but it will compile fine nonetheless.

like image 559
becko Avatar asked Mar 27 '16 08:03

becko


1 Answers

-std=c++14 is called -std=c++1y in old gcc versions (at least 4.9 and older).

like image 75
wRAR Avatar answered Nov 04 '22 11:11

wRAR