make and -std=c++11

Pages: 12
I will be trying this :
OUTPUT_OPTION += -pedantic-errors -Wall -Wextra

To compile (rather than merely link) with those flags, append them to the C++ flags instead - the macro CXXFLAGS:
1
2
CXXFLAGS += -Wall -Wextra -pedantic-errors
# rest of the makefile 

CXXFLAGS gets used in a built-in rule that compiles C++ code into object files. (That's why you don't see its expansion used anywhere.)

I modified the CXXFLAGS line like this :
CXXFLAGS += -std=c++17 -MT $@ -MP -MMD -MF $(@:.o=.d)\
-pedantic-errors -Wall -Wextra
Seems to work ok. Wish I knew what I was doing.

Thanks all for your patience,
Michel Chassey

Topic archived. No new replies allowed.
Pages: 12