Hi there,

I am using MATLAB and am trying to mex a c++ file.

I get a load of compiler errors and I am not sure why:

correspondPixels.cc(57) : error C2065: 'Matrix' : undeclared identifier

The line of code this relates to is:
Matrix m1, m2;

Now the class should be defined in the header file I included Matrix.h. This is part of the Generic Math Template library and the code for the header file can be found here:
http://ggt.sourceforge.net/html/Matrix_8h-source.html

This really has me stumped and any help would be much appreciated! :)

Dinners

Recommended Answers

All 2 Replies

Did you specify where compiler should look for that library headers? Does including Matrix.h give you an error?
btw, what compiler are you using?

I am using Visual Studio 9.0.

I put the library into the $vs install dir$\VC\include\gmtl and then used
#include "gmtl/Matrix.h"
I didn't have any errors from that. I also tried explicity pointing it to it with
#include "C:\Program Files (x86)\...\Matrix.h
Again, no errors about including it but getting the same error when trying to use the class.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.