Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: Dmytry on December 03, 2015, 07:14:35 am
-
I was trying to compile a project that uses c and c++11 files, with clang as the compiler, and I'm getting
error: invalid argument '-std=c++11' not allowed with 'C/ObjC'
Is there any easy way not to set this option for the c files?
edit: found a (less than optimal) solution: un-setting the c++11 option and editing the toolchain executables and adding -std=c++11 there just for the c++ compiler .
-
I think it's not a bug but an incapability to set different settings for C and C++ sources. They should be separated imo.
-
You should be able to add -std=c++11 to the c++ only flags.
Just right click into the compiler options ...