gpt4 book ai didi

c++11 - 在 Red Hat linux 中在 g++ 4.4.7 上编译 C++11

转载 作者:行者123 更新时间:2023-12-04 12:08:03 26 4
gpt4 key购买 nike

关闭。这个问题是not reproducible or was caused by typos .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

7年前关闭。




Improve this question




我已经尝试过:

g++ -std=c++11 my_file.cpp -o my_prog
g++ -std=c++0x ...
g++ -std=gnu++0x ...

我不断收到这条消息:
error: unrecognized command line option

最佳答案

C++0x/C++11 Support in GCC

从那里您可以看到支持 C++11,因为 gcc 4.7 和 gcc 4.4 支持 C++0x。

引自 Status of Experimental C++0x Support in GCC 4.4 :

GCC provides experimental support for the upcoming ISO C++ standard, C++0x. This support can be enabled with the -std=c++0x or -std=gnu++0x compiler options; the former disables GNU extensions.



所以它应该适用于 -std=c++0x-std=gnu++0x .

关于c++11 - 在 Red Hat linux 中在 g++ 4.4.7 上编译 C++11,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23523634/

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