Problems with compiling DLL (deploy tool)
Show older comments
Hi, I'm trying to compile a DLL using Matlab Deploytool, but everytime it occours the same error: Error: An error occurred while shelling out to mbuild (error code = 9). Which type of error is it? How can I fix it? Did Deploytool not accept any specific code structure ?
Thanks so much
Sofia
9 Comments
Friedrich
on 12 Dec 2013
Please post the full build log.
Friedrich
on 12 Dec 2013
So the actual error is:
" error MIDL2020 : error generating type library : SetFuncAndParamNames failed : get_t (0x8002802C)"
Can you compile a simple hello world example or does that also result in the same error?
Sonia
on 12 Dec 2013
Friedrich
on 12 Dec 2013
Can you try running MATLAB as administrator and try again building the COM DLL?
Sonia
on 12 Dec 2013
Friedrich
on 12 Dec 2013
It could be that the intermediate code which is generated is wrong at some point. The SetFuncAndParamNames function takes care of setting the function name and parameters. So it seems like the get_t function (which is most likely generated automatically) is not correct. Is the intermediate code preserved (should be in the src subfolder)?If so, can you share the generated code?
Sonia
on 12 Dec 2013
So we need to block the files to prevent getting them deleted by MATLAB. In such a case I do this:
files_opened = {};
folder = 'D:\IPROCESS\Acciaieria Beltrame\_mat_m - rev3 - SdS su billetta - Movicon_prove\Untitled1\src\';
while 1
files = dir(folder);
for i=1:numel(files)
if ~files(i).isdir && ~ismember(files(i).name,files_opened)
fopen(fullfile(folder,files(i).name),'r');
files_opened{end+1} = files(i).name;
end
end
end
%later after error press CTRL+C and run a fclose('all')
This should prevent that all generated files get deleted after the error.
So start compiling, then run that above code immediatly after you started the compilation process and wait for the build process to error out.
Answers (0)
Categories
Find more on Entering Commands 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!