Help with reading the functions inside a library
3 views (last 30 days)
Show older comments
Jason on 16 Jan 2021
Commented: Jason on 17 Jan 2021
Is there a reason why the code below cannot find the dll that IS in the directory as shown (there is also the h file with the same name)
[file,path] = uigetfile('C:\Users\Public\PI\PI_Programming_Files_PI_GCS2_DLL\*.dll');
%Remove the extension
[path,name,ext] = fileparts(libname)
%Rebuild without Ext
hname=fullfile(path,name) %Dont need this if same name
Error using loadlibrary
Could not find file libname.h.
Error in loadlibrary
(here are the library and header files)
Rik on 16 Jan 2021
You first store a filename in a variable, but then you use the Name of the variable to call loadlibrary.
loadlibrary(libname);%this should work better
More Answers (0)
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!