I want to use the Meschach library of matrix functions in my C++ code and in particular my Qt4 project but I'm getting a lot of errors if I #include it.

I've tried extern:

Qt Code:
  1. extern "C" {
  2. #include <meschach/matrix.h>
  3. }
To copy to clipboard, switch view to plain text mode 

name spaces

Qt Code:
  1. namespace Meschach {
  2. #include <meschach/matrix.h>
  3. }
To copy to clipboard, switch view to plain text mode 

But I just get a lot of compile errors, such as :

/usr/include/qt4/QtCore/qmap.h:434: error: expected ‘(’ before ‘{’ token
The errors mostly occur with Qt core files.

As soon as I comment out the #include <meschach/matrix.h> the problems go away !

Note, that I am using the Mechsach dynamic library so I'm not compiling any of it's code.

Could anyone give me some advice ? I must be able to call these C-library functions somehow.