cygwin下面c++編譯 在此作用域中尚未聲明

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章