Hi Jon,
I understand that you want to use “coder.ceval” call an external class's static method. The “coder.ceval” function in MATLAB Coder is primarily designed to call external C functions. It doesn't directly support calling external C++ class methods, including static methods.
However, you can achieve the desired functionality by creating a wrapper C function that calls the C++ class method and then calling that wrapper function using coder.ceval.
Here's a general outline of the steps:
Create a C++ wrapper function that calls the static method of the external class:
#include "ExternalClass.h"
extern "C" void callStaticMethodWrapper(int arg1, int arg2) {
ExternalClass::staticMethod(arg1, arg2);
In MATLAB, use "coder.ceval" to call the wrapper function:
coder.ceval('callStaticMethodWrapper', arg1, arg2);
Please refer the following documentation to learn more about using "coder.ceval":
Hope this helps.