I'm complicating a small school assignment which uses lambda functions, so it needs the '-std=c++11' in the gcc call. However the output of the make file seems to show that it is not being added. I'm not having linking problems so there is no need to copy all the source here.
Here is my makefile:
CC=g++
CFLAGS= -std=c++11 -I. -Wall
DEPS = wordarray.h
OBJ = ayalajL03b.o wordarray.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
L03b.out: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
.PHONY: clean
clean:
rm -f -v *.o
rm -f -v *.out
Here is the output:
[user@server Lab03]$ make
g++ -c -o wordarray.o wordarray.cpp
wordarray.cpp:28:77: warning: lambda expressions only available with -std=c++11 or =gnu++11
counter([](char a)->bool{return !isvowel(a) && !isdigit(a) && isalpha(a);}, Worount].word);
Please help me understand what I'm doing wrong.