Passing Matlab function pointers as arguments to Matlab functions which are called from C
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Compiler SDK 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!