Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile a project with C++11 under Xcode 8?

Tags:

c++

xcode

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.

like image 957
Adam Avatar asked Dec 29 '25 00:12

Adam


1 Answers

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]".

like image 68
Matt Cobb Avatar answered Dec 30 '25 17:12

Matt Cobb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!