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?
Thanks,
Joe
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?
Thanks,
Joe
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?
Thanks,
Joe
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/config.osx.default.mk line 132:
PLATFORM_CXXFLAGS += -std=c++11
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
$OF_ROOT/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig
Hope this helps someone.
Hi
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'