关闭。这个问题是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 .


评论关闭
IT干货网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!