Difficulty using callib (using a dll) in Matlab 2013

2 views (last 30 days)
Joel
Joel on 21 Aug 2014
Edited: Joel on 21 Aug 2014
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.

Answers (0)

Categories

Find more on C Shared Library Integration 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!