Deploying mex functions using the deploytool

5 views (last 30 days)
Mike
Mike on 23 Feb 2016
Edited: Mike on 23 Feb 2016
I'm having some troubles using the deploytool to create a solution that has to work in conjunction with a third party mex function (in this case vl_sift from the vlfeat library).
I have the following function :
%%%%%%%%%%%%%%
function [] = Sift(im)
warndlg('Entered function'); % for debug purpose
figure,imshow(im);
try
p = vl_sift(single(im)); % vl_sift is a mex function
warndlg('Sift is OK');
catch exception
warndlg('Sift Failed');
warndlg(exception.message);
end
end
%%%%%%%%%%%%%%%
when i call this function from a certain other function and deploy the code I get the warnings "Entered function" and "Sift is OK" , which means that the code worked fine. when i try to call it from a different function (a gui code) and deploy it exactly in the same manner (as far as i can see), i get the warnings "Entered function", "Sift Failed" and "Invalid MEX-file '...\vl_sift.mexw64': The specified module could not be found" ('...\' is the full path to the mex file).
I deploy the code exactly the same in both cases, yet, the mex works fine in the first and doesn't seem to be found in the second.
Anyone has any idea what could cause such a behaviour ?
Thanks, Michael.

Answers (0)

Categories

Find more on MATLAB Coder 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!