I’m developing a C++ app and need to include Google Protobuf libraries. Unfortunately those libraries produce warnings at compilation, which are treated as error and prevent me to compile.
As I don’t want to edit the Google libs I’m trying to remove the -Werror flag instead.
The problem is I’ve only found how to add flags to the compilation, located in Properties->C/C++ Build->Settings->Tool Settings->C build options
==> Is there a way to remove an existing compilation flag?
Ideally I would disable the flag only for those libs so I can keep using it for my c++ files.
As a side question, is there an easier way to include sources files to a component instead of using this pattern?
Could you try overriding the compiler flags using the
cflags:
{
}
stanza in your Component.cdef file?
Note that I’ve never tried overriding existing flags, only adding additional flags using this method.
You can also add additional flags (cflags or cxxflags) to the entire project build command line using the -C and -X options to mkapp. Again, I’ve never tried to override existing flags.
Maybe try one of these methods to add the -Wno-error flag as suggested by @CoRfr?