gpt4 book ai didi

c++ - 在 G++ 版本之间切换以支持 C++11

转载 作者:行者123 更新时间:2023-11-28 00:42:03 26 4
gpt4 key购买 nike

我安装了不支持c++11的4.7版c++。所以我关注了This并安装了 4.7 的新版本。现在我很困惑如何切换新安装的 g++。

当我输入 ls -lh/usr/bin/g++* 时,我得到了这个:

lrwxrwxrwx 1 root root   21 Aug 23 08:54 /usr/bin/g++ -> /etc/alternatives/g++
-rwxr-xr-x 1 root root 516K Apr 15 17:42 /usr/bin/g++-4.7

两者是一样的,但我怎样才能切换到更新的版本?

最佳答案

gcc 4.7 确实支持 C++11,如果您使用 -std=c++11 选项运行它。你试过吗?

关于c++ - 在 G++ 版本之间切换以支持 C++11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18394298/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com