c++11 - CFLAGS are ignored in Makefile -
c++11 - CFLAGS are ignored in Makefile -
i using next makefile build project:
cc = /usr/bin/g++ cflags = -wall -pedantic -std=c++0x ldflags = obj = main.o pnmhandler.o pixmap.o color.o pnm: $(obj) $(cc) $(cflags) -o pnm $(obj) $(ldflags) %.o: %.cpp $(cc) $(cflags) -c $<
as run create next error:
/usr/include/c++/4.9.1/bits/c++0x_warning.h:32:2: error: #error file requires compiler , library back upwards iso c++ 2011 standard. back upwards experimental, , must enabled -std=c++11 or -std=gnu++11 compiler options.
as can read next line, cflags not included, have no thought doing wrong:
g++ -c -o main.o main.cpp
also tried -std=c++11
, -std=gnu++11
, without results. ideas?
if run make -bn
, get:
g++ -c -o main.o main.cpp g++ -c -o pnmhandler.o pnmhandler.cpp g++ -c -o pixmap.o pixmap.cpp g++ -c -o color.o color.cpp /usr/bin/g++ -wall -pedantic -std=c++0x -o pnm main.o pnmhandler.o pixmap.o color.o
c++11 makefile
Comments
Post a Comment