cc1plus: error: unrecognized command line option “-std=c++11” with g++

后端 未结 4 2008
后悔当初
后悔当初 2020-12-01 02:31

I\'m trying to compile using g++ and either the -std=c++11 or c++0x flags.

However, I get this error

cc1plus:         


        
4条回答
  •  感情败类
    2020-12-01 02:53

    Seeing from your G++ version, you need to update it badly. C++11 has only been available since G++ 4.3. The most recent version is 4.7.

    In versions pre-G++ 4.7, you'll have to use -std=c++0x, for more recent versions you can use -std=c++11.

提交回复
热议问题