


Although we see it as one command, it is in fact two separate and distinct stages. It will then link the three parts to create the final executable. After compiling the three files, clang++ has three program parts (called foo.o, bar.o, and baz.o), but no complete program. Compiling by itself does not create an executable - it just creates a part of the final executable program. First, clang++ will compile each file separately. There are a number of things going on here. cpp files in the current directory: clang++ *.cpp cpp files at one time: clang++ foo.cpp bar.cpp baz.cpp When compiling a C++, so far we have compiled all of the.

That code consists of: Makefile ( src), cheese.cpp ( src), cheese.h ( src), mushrooms.cpp ( src), mushrooms.h ( src), pepperoni.cpp ( src), pepperoni.h ( src), peppers.cpp ( src), peppers.h ( src), pizza.cpp ( src), pizzadough.cpp ( src), pizzadough.h ( src), tomatosauce.cpp ( src), tomatosauce.h ( src), toppings.cpp ( src), toppings.h ( src). The original version of this tutorial was written by Paul Lee. You will need the accompanying pizza.zip file, which contains code that we will use during this tutorial. This tutorial is written to introduce the beginning C++ programmer to Unix Makefiles. Go up to the Tutorials table of contents page PDR: Makefile Tutorial PDR: Makefile Tutorial
