【问题标题】:compiling in SSH Secure Shell c++在 SSH Secure Shell c++ 中编译
【发布时间】:2013-01-19 02:39:15
【问题描述】:

当我运行 g++ 时,它会抛出几个错误:

$ g++  SongStructure.cpp mtmtest.cpp Song.cpp examples/OldSongExample.cpp -std=c++11 -Wall -Werror -pedantic-errors -DNDEBUG -o example

cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"
cc1plus: error: unrecognized command line option "-std=c++11"

如何解决这个问题,为什么会这样?有人有想法吗?

【问题讨论】:

  • 您使用的是什么版本的 g++? (查看:g++ --version)

标签: c++ shell ssh compiler-errors g++


【解决方案1】:

您只是拥有一个不支持 C++11 标准的 g++ (gcc) 版本。您可以不使用 C++11(或者如果您不使用,则不要指定 -std=c++11),请尝试使用在 C++11 处于实验阶段时某些旧版本的 GCC 支持的 -std=c++0x命名为 C++0x,或者升级你的编译器。

【讨论】:

    猜你喜欢
    • 2019-07-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-13
    • 2023-03-30
    • 1970-01-01
    • 2012-08-06
    • 1970-01-01
    相关资源
    最近更新 更多