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

2 views (last 30 days)
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.

Answers (0)

Categories

Find more on MATLAB Compiler SDK in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!