Cannot compile C++ program with custom header files in Linux

view story

http://stackoverflow.com – I'm new to C++ and I'm having some trouble trying to compile my program. I have a Driver.cpp file which contains main(), and 2 header files each with corresponding .cpp files. They are all in the same directory. The Driver.cpp file only calls a function in one of the other header files, which does the rest of the work. My problem is I cannot compile the code as I keep getting "Undefined symbol first referenced in file" errors. I've tried many different ways of writing the compile code but none works. Here is one I tried: "g++ -lm -o outputfile headerOne.cpp headerTwo.cpp Driver.cpp" If an (HowTos)