I've never used the unix 'make' facility before, but now I need to use it to build a large c++ program (on RedHat Linux using g++ which is Gnu C++ compiler for development, then to move to Windows using Visual C++ just for final verification and NotePad just for printing), so for a first test of the whole combo of make and g++ on Linux I set up these files:
Header for nice class
Source for nice class
Source for junk toplevel
makefile to build above files into executable (Adapted from the example in "Introducing the UNIX System" by McGilton and Morgan, 1983)
The two files compile without problem, but the loader issues these errors
After I went to all the trouble of uploading those files and setting up this HTML file to describe my problem, I got an idea: Maybe the 'ld' command isn't the right loader for gnu C++ files. So I tried manually issuing the command "g++ nice.o junk.o -o junk" and this time I didn't get any loader errors, so I changed the makefile to be like this
and now it loads without error.