CS 1320 (Principles of Algorithm Design I):
Instructions for Compiling test_rational_v1.cc

Instructions for compiling test_rationals_v1:
  1. You will need files rationals_v1.cc, test_rationals_v1.cc, and rationals_v1.h.
  2. Compile rationals_v1.cc:
    	g++ -c rationals_v1.cc
    	
    This produces a file rationals_v1.o containing object code for the class.
  3. Compile test_rationals_v1.cc:
    	g++ -c test_rationals_v1.cc
    	
    This produces a file test_rationals_v1.o containing object code for the test program.
  4. Make the executable:
    	g++ -o test_rationals_v1 test_rationals_v1.o rationals_v1.o 
    	
    This links together the two files produced in the preceding steps and produces executable file test_rationals_v1.
You can now run the program by typing:
	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.)