error using mex with external library with extra qualifiers
Afficher commentaires plus anciens
Hello,
I am trying to compile a mex function with an external .cpp library which has extra qualifiers. How can I call the functions from external library that has extra qualifiers?
If I don't add the qualifier the error is:
C:\Users\rdeshpande\DS10ep_workspace\MatlabProspectra\mfiles\cprogram\CallMathLib.cpp:29:47: error: 'Add' was not declared in this scope
plhs[0] =mxCreateDoubleScalar (Add(no1,no2));
If I add the extra qualifier in this call
plhs[0] =mxCreateDoubleScalar (MathLibrary::Functions::Add(no1,no2));
The error is: Building with 'MinGW64 Compiler (C++)'. Error using mex C:\Users\RDESHP~1\AppData\Local\Temp\mex_245413811332369_15808\CallMathLib.obj:CallMathLib.cpp:(.text+0xab): undefined reference to `__imp__ZN11MathLibrary9Functions3AddEdd' collect2.exe: error: ld returned 1 exit status
2 commentaires
James Tursa
le 15 Juin 2017
What is the mex command you are using? How are you linking in the MathLibrary?
Rucha Deshpande
le 16 Juin 2017
Réponses (0)
Catégories
En savoir plus sur Write C Functions Callable from MATLAB (MEX Files) dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!