Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

No Matching Signature Error

This error occurs when you call a function without the correct input or output arguments, or if there is an error in the function signature in the header file.

For example, the function signature for the addStructByRef function in shrlibsample is:

[double, c_structPtr] addStructByRef(c_structPtr)

Load the library.

addpath(fullfile(matlabroot,'extern','examples','shrlib'))
loadlibrary('shrlibsample')

Create a structure, and call addStructByRef.

struct.p1 = 4;
struct.p2 = 7.3;
struct.p3 = -290; 

If you call the function without the input argument, MATLAB® displays the error message.

[res,st] = calllib('shrlibsample','addStructByRef')
Error using calllib
No method with matching signature.

The correct call is:

[res,st] = calllib('shrlibsample','addStructByRef',struct)

See Also

|

Was this topic helpful?