next up previous contents
Next: Some notes on installation Up: Trouble shooting Previous: General problems   Contents

Matrix class troubles

Some users reported having problems compiling a template class which was implemented in different files. I hope that by explaining my problems I might help someone else.

For the aCC compiler the flag +inst_implicit_include had to be used. This flag include the file matrixklasse.cc (note: .cc) automatically.

Furthermore, for making an archive library, the member functions had to be instantiated explicitly, see file matlib.c for how I did that. The friend functions also had to be instantiated, also see the Makefile and matlib.c.

We previously ran into some problems with the gnu g++ compiler version 2.95.2 and were not able to compile Doris (explicit instantiation mechanism/parsing of friend template functions, bug in this version?). We solved this problem by putting all definitions of the matrix class in one file and compiling without first creating a matrix library. Doris v2.4 and higher should therefor be more compiler/platform independent. For developers this is not quite so comfortable, because the code is less transparent this way.

If compilation as described above gives problems, try the following:

  1. Try make -n processor.o (only echos command to the screen) and paste this from the prompt to give you more direct control.
  2. Do not use Veclib and Lapack libraries, even if you have them. To exclude them, define DEF4 and DEF5 in the Makefile (uncomment the defines). Now you will be making use of the internal routines, which are based on numerical recipes routines.
  3. Set verbose flags for compilation (-v likely, add to CFLAGS).
  4. Try to compile object code for a individual source files, e.g., make processor.o and if successful, try others. make swobjs does all.
  5. If all .o files are compiled correctly, use make or make doris to link them.
  6. Try another compiler (first make clean).


next up previous contents
Next: Some notes on installation Up: Trouble shooting Previous: General problems   Contents
Leijen 2009-04-14