g++ -c Hash.cpp -o Hash.o g++ -o prog1 main.cpp Hash.o -std=c++0x
Or
g++ -c main.cpp -o obj/main.o
I have two files that are .cpp and one .h file. Typical setup with definitions in the header file and methods in implementation file. Then the second .cpp file calls main and creates the object. I get a common error that i see on many of the threads here which say to fix the linker. Trouble is I am too new at C++ to know where I am supposed to enter the aforementioned code.