error LNK2019: unresolved external symbol "public: __thiscall Matrix::Matrix(void)
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I try to MEX a C++ file( with extension .cc) in MATLAB 2013b, compiler Visual Studio 2012 professional, OS 32-bit Windows, I take below errors ;
if true
correspondPixels.obj : error LNK2019: unresolved external symbol "public: __thiscall Matrix::Matrix(void)" (??0Matrix@@QAE@XZ) referenced in function _mexFunction
correspondPixels.obj : error LNK2019: unresolved external symbol "public: __thiscall Matrix::Matrix(int,int,double *)" (??0Matrix@@QAE@HHPAN@Z) referenced in function _mexFunction
correspondPixels.obj : error LNK2019: unresolved external symbol "public: __thiscall Matrix::~Matrix(void)" (??1Matrix@@QAE@XZ) referenced in function _mexFunction
correspondPixels.obj : error LNK2019: unresolved external symbol "public: int __thiscall Matrix::numel(void)const " (?numel@Matrix@@QBEHXZ) referenced in function _mexFunction
correspondPixels.obj : error LNK2019: unresolved external symbol "public: double * __thiscall Matrix::data(void)" (?data@Matrix@@QAEPANXZ) referenced in function _mexFunction
correspondPixels.obj : error LNK2019: unresolved external symbol "double __cdecl matchEdgeMaps(class Matrix const &,class Matrix const &,double,double,class Matrix &,class Matrix &)" (?matchEdgeMaps@@YANABVMatrix@@0NNAAV1@1@Z) referenced in function _mexFunction
correspondPixels.mexw32 : fatal error LNK1120: 6 unresolved externals
C:\PROGRA~1\MATLAB\R2013B\BIN\MEX.PL: Error: Link of 'correspondPixels.mexw32' failed
end
I searched similar errors and try to apply some advising solutions but no-one helps me. Maybe there is an declared constructor but undefined function or unimplemented ones? Maybe due to a missing .dll file? I am familiar with MATLAB more. not much C++. Is there any solution idea?
0 comentarios
Respuestas (2)
Walter Roberson
el 13 de Mzo. de 2017
Class Matrix is not a standard C++ class; it is also not part of the common add-on "Boost".
0 comentarios
doner_t
el 13 de Mzo. de 2017
2 comentarios
Walter Roberson
el 13 de Mzo. de 2017
You could probably just mex everything together, but more common would be to compile the Matrix stuff into a shared library and use a -l switch on the mex command line to link in the library.
Ver también
Categorías
Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!