Difficulty using callib (using a dll) in Matlab 2013

1 次查看(过去 30 天)
In Matlab 2011b and earlier, I am able to load and execute commands from a *.DLL using loadlibrary and calllib.
On the SAME computer using Matlab 2013 (release A I think) the library loads but the calllib lines don't execute correctly. No syntax error is returned in Matlab, but the attached hardware it controls does now respond.
I am wondering what is different in the way Matlab 2011 and 2013 load and call such libraries that might cause this? Is there a new syntax or optional input arguments I am not aware of?
First I execute mex -setup (at prompts Yes, 1, Yes) Then my code basically looks like this: loadlibrary('RobotDll','RobotDll.h'); HardwareWorks = calllib('RobotDll','RIsInitDone'); % returns a 1 if working and a 0 if not
In 2011 >> HardwareWorks = 1 and attached robot moves
In 2013 >> HardwareWorks = 0 and attached robot does not move.
Thank you in advance.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 C Shared Library Integration 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by