Problems with compiling DLL (deploy tool)
이전 댓글 표시
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
Friedrich
2013년 12월 12일
Please post the full build log.
Friedrich
2013년 12월 12일
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
2013년 12월 12일
Friedrich
2013년 12월 12일
Can you try running MATLAB as administrator and try again building the COM DLL?
Sonia
2013년 12월 12일
Friedrich
2013년 12월 12일
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
2013년 12월 12일
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.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!