Passing Matlab function pointers as arguments to Matlab functions which are called from C

Hi,
Hopefully this is possible. I've created two dll's from two m-files; let's call then Funct1.dll and Funct2.dll.
I'm trying to pass Funct1 as a function pointer to funct1--that is, Funct1 is an argument of Funct2. And, Funct2 is called from a C/C++ application. So, my pseudo code is:
//C/C++ application
...
int main()
...
mlfFunt(mlfFunct1, <param2>, <param3>, ...)
//where mlfFunct1 and mlfFunct2 have corresponding
//Funct1.dll and Funct2.dll's compiled from m-file functions
...
return 0;
I keep getting a C/C++ compiler error that "cannot convert parameter <#> from bool ...
I assume that this is because the Matlab m-file function compiled to a dll always returns a bool?
Am I going in the correct direction? Or is there an alternative/better method?
Thanks for efforts.

답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Compiler SDK에 대해 자세히 알아보기

질문:

KME
2012년 5월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by