Name of MEX class other than MexFunction

조회 수: 1 (최근 30일)
Diego Leal Gonzalez
Diego Leal Gonzalez 2020년 11월 19일
답변: Priysha LNU 2020년 11월 24일
Am I allowed to use a different name for a MEX class other than MexFunction?
I tried the following and gives me a ton of errors (forward declaration of 'MexFunction')
class test : public matlab::mex::Function{
}
but if I use
class MexFunction : public matlab::mex::Function{
}
works fine

답변 (2개)

Pankhuri Kasliwal
Pankhuri Kasliwal 2020년 11월 24일
Hello,
The documentation says that it must be called MexFunction. Please refer to the link given below -

Priysha LNU
Priysha LNU 2020년 11월 24일
Hi,
Here is an excerpt from the documentation:
"Define a C++ MEX function as a class named MexFunction that derives from the matlab::mex::Function class. The MexFunction class overrides the virtual operator() of the matlab::mex::Function class."
So, the class named as "MexFunction" should be entry point.
For more details and examples, refer to the following documentation links:
Hope this helps!
DISCLAIMER: These are my own views and in no way depict those of MathWorks.

카테고리

Help CenterFile Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by