简体   繁体   English

为什么我不能运行C ++ 11?

[英]Why I can't run C++11?

I included chrono header and it wouldn't find it. 我包括了chrono标头,但找不到它。 I used the namespace chrono and it didn't compile it. 我使用了名称空间chrono,但没有对其进行编译。

The question is, is this a problem of Eclipse or the compiler does not support C++11? 问题是,这是Eclipse的问题还是编译器不支持C ++ 11? I have added in Eclipse the corresponding flag and macro. 我在Eclipse中添加了相应的标志和宏。

Under this directory 在这个目录下

/usr/include/c++/4.3.2 /usr/include/c++/4.3.2

I can not find chrono, only this file "c++0x_warning.h" regarding c++11. 我找不到chrono,只有关于c ++ 11的文件“ c ++ 0x_warning.h”。

The problem is that I am using a computer that I am not admin of and requesting a compiler's update would have me do a long procedure. 问题是我使用的不是我所管理的计算机,并且请求编译器更新将使我执行一个漫长的过程。

This might be helpful. 可能会有所帮助。

Use a compiler with chrono support :-) 使用支持chrono的编译器:-)

See: http://gcc.gnu.org/gcc-4.4/changes.html 请参阅: http//gcc.gnu.org/gcc-4.4/changes.html

gcc supports chrono from version 4.4. gcc从版本4.4开始支持chrono。 You compiler is simply much too old. 您的编译器太旧了。 Take the actual 4.9.0. 以实际的4.9.0。 So you have also regex as present :-) 所以你也有正则表达式:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以在不支持它的平台上运行用 C++11 编译的二进制文件吗? - Can I run binary compiled with C++11 on the platform which doesn't support it? C ++ 11实验,为什么我不能使用一些功能? - C++11 experiments, why can't I use some of the features? 为什么我不能在 C++11 中创建一个 lambda 向量(相同类型)? - Why can't I create a vector of lambdas (of the same type) in C++11? 为什么我不能通过在C ++ 11中运行多个线程来获得任何性能改进? - Why can't I get any performance improvements by running multiple threads in C++11? 为什么我不能在C ++ 11中使用constexpr指针作为模板参数? - Why can't I use a constexpr pointer as template parameter in C++11? 为什么我不能将右值引用传递给 C++11 中的另一个函数? - Why can't I pass an rvalue-reference as it is to another function in C++11? 为什么不能用大括号括起来的初始化程序列表构造队列/堆栈? (C ++ 11) - Why can't I construct a queue/stack with brace-enclosed initializer lists? (C++11) 为什么我可以在C ++ 11中使用const函数修改类? - Why can I modify the class with a const function in C++11? c ++ 11努力理解为什么我不能统一初始化结构,但是可以初始化类似类型的std :: pair - c++11 struggling to understand why I can't uniform init a structure, but I can init a std::pair of similar type C ++ 11声明`:: T i`? - C++11 declaration `::T i`?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM