Problem loading .h library into MATLAB

Legacy support with Phidget21
gre0012017
Fresh meat
Posts: 1
Joined: Tue Feb 07, 2017 11:23 am
Contact:

Problem loading .h library into MATLAB

Postby gre0012017 » Tue Feb 07, 2017 11:27 am

Hello,

I have the PhidgetBridge 4-Input, and I am trying to run the loadphidget21.m file in MATLAB, using the code that was given here online. I am receiving the following errors any time I try to run it, however, I have moved all of the phidget libraries into MATLAB library, so I am not sure why it is not working. I hope someone has run into the same problem so they can shed some light on this topic as well. Thank yoU!!

----MATLAB CODE----
%loadphidget21.m - Loads the phidget21 library, paying attention to OS,
%suppressing warnings.
function loadphidget21

if not(libisloaded('phidget21'))
warning off MATLAB:loadlibrary:TypeNotFound
warning off MATLAB:loadlibrary:TypeNotFoundForStructure
switch computer
case 'PCWIN'
[notfound,warnings]=libisloaded('phidget21.lib','phidget21Matlab_Windows_x64.h');

case 'PCWIN64'
[notfound,warnings]=libisloaded('phidget21.lib', 'phidget21Matlab_Windows_x64.h');
%case 'MAC'
%case 'MACI'
%case 'MACI64'
% [notfound,warnings]=loadlibrary('/Library/frameworks/Phidget21.framework/Versions/Current/Phidget21', 'phidget21Matlab.h', 'alias', 'phidget21');
%case 'GLNX86'
%case 'GLNXA64'
%[notfound,warnings]=loadlibrary('/usr/lib/libphidget21.so', 'phidget21Matlab.h', 'alias', 'phidget21');

end
end
end





---MATLAB ERRORS----
>> loadphidget21
Error using libisloaded
Library name must be a string.

Error in loadphidget21 (line 13)
[notfound,warnings]=libisloaded('phidget21.lib', 'phidget21Matlab_Windows_x64.h');

the_trent42
Fresh meat
Posts: 1
Joined: Mon Dec 04, 2017 11:38 am
Contact:

Re: Problem loading .h library into MATLAB

Postby the_trent42 » Mon Dec 04, 2017 11:41 am

Hey,

I am having the same problem. I was wondering if you had figured out the solution to this. I cant seem to get this lib downloaded.

User avatar
mparadis
Site Admin
Posts: 581
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Problem loading .h library into MATLAB

Postby mparadis » Mon Dec 04, 2017 3:37 pm

Judging by the error message, the problem isn't with Phidgets libraries but with the "libisloaded" Matlab function. Does libisloaded work for your other Matlab libraries?


Return to “Matlab”

Who is online

Users browsing this forum: No registered users and 1 guest