I use .h as the suffix of definition files and .cpp as the suffix of C++ source files.
You will need to compile all the *.cpp files except example.cpp, the tmt*.cpp files, sl_ex.cpp and ex_nl.cpp to get the complete package. Ideally you should store the resulting object files as a library. The tmt*.cpp files are used for testing, example.cpp is an example and sl_ex.cpp and ex_nl.cpp are examples of the non-linear solve and optimisation routines.
I include a number of make files for compiling the example and the test package. See the files section for details. But with Borland and Watcom, its pretty quick just to load all the files in the interactive environment by pointing and clicking. My Borland make files are generated from the interactive environment.
Use the large or flat model when you are using a PC. Do not outline inline functions. You may need to increase the stack size.
The make files for the Unix compilers link a .cxx file to each .cpp file since some of these compilers do not recognise .cpp as a legitimate extension for a C++ file. I suggest you delete this part of the make file and rename the .cpp files to something your compiler recognises.
My make files for Unix systems are for use with gmake rather than make. Ordinary make works with them on the Sun but not the Silicon Graphics or HP machines.
Your source files that access the newmat you will need to #include one or more of the following files.
See the section on customising to see how to edit include.h for your environment and the section on compilers for any special problems with the compiler you are using.