I am trying to learn how to use makefiles and decided to start off with a simple program. I load 0-19 into a vector and the print out each element of the vector.
makefile
1 2 3 4 5 6 7 8 9 10
all: program
program: main.o printVec.o
g++ main.o printVec.o -o program
main.o: main.cpp
g++ -c main.cpp
printVec.o: printVec.cpp
g++ -c printVec.cpp
Thank you, it is working now. I have another question though. When the compiler compiles(or whatever the proper term is) main.cpp to main.o, does it also compile functions.h with main.cpp, or does it just compile main.cpp to main.o and needs functions.h to make sure that it is sending the right information?