loadLibrary and .dll problem
loadLibrary and .dll problem
(OP)
I am having a problem with the compiler and an outside .dll library. A program I wrote to simply open the library and then close it works fine in matlab but when I compile the program I get errors that lead to it force closing, specifically with the loadlibrary function call. The resulting explanation is:
??? Error using ==> loadlibrary at 474
There was an error loading the library "C:\Program Files\MATLAB\R2009a\DVImgAccess_110207\dv_img_io.dll" Undefined function or variable 'dv_img_io_proto'.
Error in ==> DVImgLibOpen at 12
Error in ==>DVLibTest at 3
Caused by:
Error using ==> feval
Undefined function or variable 'dv_img_io_proto'.
MATLAB: UndefinedFunction
DVLibTest is the program that opens and closes the library. DVImgLibOpen is the function call that opens the library. Its code looks like this:
function [] = DVImgLibOpen(ListFunctions)
LibPath = dvimgroot();
tf=ispc;
if tf ==1
SharedPath = fullfile(LibPath, [DVImgLibName '.dll']);
else
SharedPath = fullfile(LibPath, [DVImgLibName '.so']);
end
HeaderPath = fullfile(LibPath, [DVImgLibName '.h']);
loadlibrary(SharedPath,HeaderPath);
if ListFunctions ~= 0
libfunctions (DVImgLibName) -full
end
Any help?
Thanks!
??? Error using ==> loadlibrary at 474
There was an error loading the library "C:\Program Files\MATLAB\R2009a\DVImgAccess_110207\dv_img_io.dll" Undefined function or variable 'dv_img_io_proto'.
Error in ==> DVImgLibOpen at 12
Error in ==>DVLibTest at 3
Caused by:
Error using ==> feval
Undefined function or variable 'dv_img_io_proto'.
MATLAB: UndefinedFunction
DVLibTest is the program that opens and closes the library. DVImgLibOpen is the function call that opens the library. Its code looks like this:
function [] = DVImgLibOpen(ListFunctions)
LibPath = dvimgroot();
tf=ispc;
if tf ==1
SharedPath = fullfile(LibPath, [DVImgLibName '.dll']);
else
SharedPath = fullfile(LibPath, [DVImgLibName '.so']);
end
HeaderPath = fullfile(LibPath, [DVImgLibName '.h']);
loadlibrary(SharedPath,HeaderPath);
if ListFunctions ~= 0
libfunctions (DVImgLibName) -full
end
Any help?
Thanks!
RE: loadLibrary and .dll problem
RE: loadLibrary and .dll problem
Post DVLibTest if you haven't figured it out yet