cygwin下面c++编译 在此作用域中尚未声明

来源:互联网 发布:跑步计步器软件 编辑:程序博客网 时间:2024/05/18 22:13

Some functions go beyond the ANSI standard. These are disabled when you use std=c++11 (or std=c++0x).

Among them are fdopen, fileno and strdup. There are two possibilities to use them:

Use the GNU dialect (std=gnu++11).If you want to compile without dialect and make a local exception, you can include stdio.h with the __STRICT_ANSI__ undefined. 

I have tested both on Suse Linux Enterprise 11, MinGW and Cygwin.

见http://stackoverflow.com/questions/18784112/googletest-1-6-with-cygwin-1-7-compile-error-fileno-was-not-declared-in-this

0 0
原创粉丝点击