I am getting an error of “Undefined function 'Calllib' for input arguments of type 'char'.”
Show older comments
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
Answers (2)
ES
on 29 Jul 2014
0 votes
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
on 26 Sep 2014
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)
Categories
Find more on LabVIEW in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!