I am getting an error of “Undefined function 'Calllib' for input arguments of type 'char'.”
古いコメントを表示
Hi,
Help me with this.
I am writing a matlab script to read a LabVIEW dll.
Following is the script
clear all
loadlibrary('AETSmapinput','AETSmapinput.h','alias','lib');
libfunctionsview lib;
vp = '';
len = 3;
y = [];
z = [];
[x1,x2,x3] = Calllib('lib','CheckIOFromAETSToMatlab',vp,double(y),double(z),len);
unloadlibrary(lib);
clear all
I am getting an error of “Undefined function 'Calllib' for input arguments of type 'char'.”
When I am listing the dll the following is the datatypes listed in the dll function
list =
'[cstring, doublePtr, doublePtr] CheckIOFromAETSToMatlab(cstring, doublePtr, doublePtr, int32)'
'[long, cstring, voidPtr] LVDLLStatus(cstring, int32, voidPtr)'
What could be the reason for this?
Thanks
Anna
回答 (2 件)
ES
2014 年 7 月 29 日
0 投票
Calllib is not available in the MATLAB path. do a which -all Calllib to check if it is defined anywhere. I guess not.
If it is a user defined function or plugin, find the source and add it in your MATLAB path and then run the script.
Geoff Hayes
2014 年 9 月 26 日
While Anna probably figured this out months ago, the function to call a method in a shared library is called calllib with a lowercase 'c' and not Calllib with an uppercase 'C'. So the above code becomes
[x1,x2,x3] = calllib('lib','CheckIOFromAETSToMatlab',vp,double(y),double(z),len)
カテゴリ
ヘルプ センター および File Exchange で LabVIEW についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!