error using mex with external library with extra qualifiers
이전 댓글 표시
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
James Tursa
2017년 6월 15일
What is the mex command you are using? How are you linking in the MathLibrary?
Rucha Deshpande
2017년 6월 16일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!