calling a dll
9 次查看(过去 30 天)
显示 更早的评论
I wish to call my dll (simpledll)from Matlab R2007b; I have loaded the dll successfully. Then from the 'libfunctions' I get the function: "doublePtr changevar(double, doublePtr)" displayed. This looks ok to me, as all it does is inputs a value (double) & returns a value (double).
I tried calling it using the following: in1=2; [out1]=callib('simpledll','changevar',in1);
But I get the following error on the calling line: "Undefined function or method 'callib' for input arguments of type 'char'."
What does this mean; have I got the format for calling the dll wrong; what should I have put?
0 个评论
采纳的回答
Friedrich
2011-7-11
Hi,
this be because calllib is written with three l instead of two like you did.
2 个评论
Kaustubha Govind
2011-7-11
doublePtr changevar(double, doublePtr)
this seems to indicate that the function needs two inputs, but you are only providing one.
更多回答(1 个)
Steve
2011-7-11
3 个评论
Kaustubha Govind
2011-9-27
You said that libfunctions lists the function as "doublePtr changevar(double, doublePtr)" - this indicates that the function has 2 inputs. What is the corresponding signature for the function with one input?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call C from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!