Using -std=c++14 in osx

I just want to compile my oF project on c++14 environment.
I added PROJECT_CFLAGS in config.make file in my project but it didn’t worked (log says -std=c++11)

oF version is v0.9.8 release.

Any advices? or am I doing wrong?


If you use Xcode, you can go to the Build Settings and find C++ Language Dialect and change the settings to C++14[-std=c++14].

Thanks! In XCode it works.

But I usually do 'make' directly from console when building the project.
Any solution for this?


there’s no way right now to change this per project. it’s a hardcoded value that you can change in libs/openFrameworksCompiled/project/osx/ line 132:

1 Like

Thank you for your info!!

I’m using XCode 10 (now 11) and the only thing that really worked for me was setting
CLANG_CXX_LANGUAGE_STANDARD[arch=x86_64] = c++14
in the file

Hope this helps someone.

I changed that CLANG_CXX_LANGUAGE_STANDARD[arch=x86_64] = c++14
But now all the OF projects have this error in ofConstants, line 430

/Users/david/of_v0.11.2/libs/openFrameworks/utils/ofConstants.h:430:50: expected ')'
/Users/david/of_v0.11.2/libs/openFrameworks/utils/ofUtils.h:112:3: unknown type name 'constexpr'
/Users/david/of_v0.11.2/libs/openFrameworks/utils/ofUtils.h:112:21: expected ';' at end of declaration
/Users/david/of_v0.11.2/libs/openFrameworks/utils/ofUtils.h:116:21: use of undeclared identifier 'NANOS_PER_SEC'
/Users/david/of_v0.11.2/libs/openFrameworks/utils/ofUtils.h:118:21: use of undeclared identifier 'NANOS_PER_SEC'
/Users/david/of_v0.11.2/libs/openFrameworks/utils/ofUtils.h:118:35: use of undeclared identifier 'secs'