Another question.
I did inherit a class Page from class Base:
and I modified the Makefile:
------------- Makefile ------------------
compile :
g++ -c base.cpp -o base.o
g++ -c page.cpp base.o -o page.o <-------- this line is new
g++ axf.cpp base.o page.o -o axf.o <-------- added the page.o
clear :
clear
clean :
rm *.o
run :
./axf.o
The result is:
rm *.o
g++ -c base.cpp -o base.o
g++ -c page.cpp base.o -o page.o
g++: cannot specify -o with -c or -S and multiple compilations
make: *** [compile] Error 1
Why?