Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

loadLibrary and .dll problem

Status
Not open for further replies.

jseubert

Computer
Sep 7, 2010
1
US
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!
 
Replies continue below

Recommended for you

May be a bit late but is dv_img_io_proto defined in DVImgLibOpen?
 
where is dv_img_io_proto defined? in DVLibTest?
Post DVLibTest if you haven't figured it out yet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top