I am trying to build a very simple app using c++.
My app is as follow:
│ ├── Component.cdef
│ ├── myclass.cpp
│ ├── myclass.h
│ └── test.cpp
This app build as long as I don’t need a particular cxxflag.
However if I add #include in myclass.h and the following in Component.cdef as explain in http://www.legato.io/legato-docs/15_05/def_files_cdef.html#defFilesCdef_cxxFlags :
My app doesn’t build anymore and print:
c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
It prints the same error if I add the cxxflags or if I remove it. It seems that the cxxflags is ignored because -std=c++11 doesn’t appear during the build.
For debugging purpose I added this flag :
And this time I could see that my flag appeared during the build but as expected I had the following error:
error: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C [-Werror]
What am I doing wrong ?