calling c++ function from MATLAB, but clib error is "no method <function name> with matching signature found"

wrote a basic c++ function that has double const * return, inputs of (double * x, double * y, double n)
This function was tested in c++ and it works fine.
On to matlab, used the clibgen.generateLibraryDefinition( ... ) to get the .mlx file. then modified the .mlx just like the basic Example given in matlab help. Finally used build(<mlx file name>) to build it, addpath.
In matlab, I tried passing an double array like
o = <the c++ function>(x, y, n);
get the no method with matching signature found error. Also tried converting input arguments with clibConvertArray with many different options and nothing works. What's the correct syntax to call this function?

回答 (0 件)

この質問は閉じられています。

製品

リリース

R2021b

タグ

質問済み:

2023 年 6 月 20 日

閉鎖済み:

2023 年 6 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by