I am getting an error of “Undefined function 'Calllib' for input arguments of type 'char'.”
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (2개)
ES
2014년 7월 29일
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.
댓글 수: 0
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)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 LabVIEW에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!