error LNK2019: unresolved external symbol "public: __thiscall Matrix::Matrix(void)
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (2)
Walter Roberson
il 13 Mar 2017
Class Matrix is not a standard C++ class; it is also not part of the common add-on "Boost".
0 Commenti
doner_t
il 13 Mar 2017
2 Commenti
Walter Roberson
il 13 Mar 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.
Vedere anche
Categorie
Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!