简体   繁体   中英

Xcode 5.1 compile against C++98, avoid C++11 features

I'm currently working on a project that primarily uses C++98 as a coding standard for backwards compatibility. I'm working on OSX10.9 mavericks and have compiled all dependencies against libc++ . I would like to configure Xcode in such a way that it gives me a warning or doesn't compile when I use C++11 language features.

Compiling with the -std=c++98 flag didn't show any errors/notifications concerning the use of C++11 features.

I didn't enable the "Using C++11 extensions in earlier versions of C++"-warning. Now XCode will show me a compiler warning if I use C++11 features.

To check if I use library features from the new standard I still have to link libstdc++ .

该屏幕快照显示了XCode中的“在早期版本的C ++中使用C ++ 11扩展”。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM