Compiling c++ code in bash
So, I've recently been handed some code, and I'm trying to compile it. I've had experience with C++ but it was actually quite a few years ago.
Anyway, I was sent a nice tar file with the directory I needed. Unpacked it and I have to .cpp files and like 5 or 6 .h files. Every time I try to compile, I get a load of errors from one specific .h file and my compilation aborts. Before I keep hacking away at this and try to do something crazy like debugging code I didn't write, I want to just double check with people that I'm executing the compilation commands correctly.
I downloaded g++ as my compiler. And I'm running with the command
g++ -c XXXX.cpp
Is this right, do I have to do anything like in FORTRAN where I link the .h files to the main files, or is the fact that the .h files are called in the source files sufficient.
Thanks in advance.