error using mex with external library with extra qualifiers
Mostrar comentarios más antiguos
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 comentarios
James Tursa
el 15 de Jun. de 2017
What is the mex command you are using? How are you linking in the MathLibrary?
Rucha Deshpande
el 16 de Jun. de 2017
Respuestas (0)
Categorías
Más información sobre Write C Functions Callable from MATLAB (MEX Files) en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!