g++ -c rationals_v1.ccThis produces a file rationals_v1.o containing object code for the class.
g++ -c test_rationals_v1.ccThis produces a file test_rationals_v1.o containing object code for the test program.
g++ -o test_rationals_v1 test_rationals_v1.o rationals_v1.oThis links together the two files produced in the preceding steps and produces executable file test_rationals_v1.
test_rationals_v1
This whole process can be automated by use of a Unix "make" file. Copy file Makefile.rationals into the directory with the source files listed above, and type:
make -f Makefile.rationals test_rationals_v1(For more information on how the make command works, read the online documentation (man make or info make) or talk to your instructor.)