My program has 5 files: main.cpp a.cpp b.cpp a.hpp b.hpp I was given a skeleton makefile to work with, but Im not that confident when it comes to manipulating it. When I try running "make" I get this 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.
I am not sure how to change this Makefile that I have so that my program compiles. This is for a graphic's course, so one of my headers in these files is .
CC=g++
CFLAGS=-c -Wall
LDFLAGS=
SOURCES=main.cpp a.cpp b.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=test
INCLUDE=a.hpp b.hpp
LIBS = -L /usr/X11R6/lib/ -lglut -lGL -lGLU -lX11 -lXmu -lXi -lm
all: $(SOURCES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@ $(LIBS)
.cpp.o:
$(CC) $(CFLAGS) $< -o $(INCLUDE) $@
Aucun commentaire:
Enregistrer un commentaire