如何在Xcode 8下使用C ++ 11编译项目? [英] How to compile a project with C++11 under Xcode 8?

查看:60
本文介绍了如何在Xcode 8下使用C ++ 11编译项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题被问了很多遍,而我却无法复制我能找到的所有解决方案。我在文件->项目设置下找不到此设置(有些建议)。请非常具体。如果您知道Xcode 7的答案,那么它也可能也对我有用。

This question was asked many times and I failed to replicate all of the solutions I could find. I am unable to find this setting under File->Project Settings (as some suggested). Please be very specific. If you know an answer for Xcode 7, chances are it will work for me too.

推荐答案

对于7和8都是一样的在项目浏览器中,选择项目。在主面板的左上方,选择目标。现在,主面板应具有常规,资源标签,构建设置,构建阶段和&沿顶部建立规则。选择构建设置,然后选择全部。向下滚动到 Apple LLVM 8.0语言C ++并展开它。将 C ++语言方言更改为 C ++ 11 [-std = c ++ 11]。

It's the same for 7 and 8. From the Project Navigator, select the project. In the main panel, at the top left, select the target. Now the main panel should have General, Resource Tags, Build Settings, Build Phases, & Build Rules along the top. Select Build Settings, select All. Scroll down to "Apple LLVM 8.0 Language C++" and expand it. Change "C++ Language Dialect" to "C++11 [-std=c++11]".

这篇关于如何在Xcode 8下使用C ++ 11编译项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆