- Delete the 'slprj' folder and everything else from the build folder including the MEX files
- Rebuild the model to generate the new MEX files, makefile and other build files.
libmwi18n.dll, libmx.dll, libmat.dll could not be found when building code with slbuild
조회 수: 22 (최근 30일)
이전 댓글 표시
Hello everyone,
I'm trying to build a standalone executable file from simulink model with the command slbuild. This runs via Matlab without errors, but when I run the executable file externally (I mean double click on it), I get the error that some .dll files (libmwi18n.dll, libmx.dll, libmat.dll) could not found which are also in the matlab installation folder (matlabroot/bin/win64). How should create the executable file so that it also runs externally in another working folder?
I use this code for building and running:
% Build and run simulations
simulationStopTime = simulationStopTimeArray(1);
slbuild(models(modelNumber))
for k = 1:length(simulationStopTimeArray)
for iRepeat = 1:2
tic
eval(['!' modelName ' -tf ' num2str(simulationStopTimeArray(k))])
durationOfBuiltCodeRSim(k) = toc;
end
end
I would appreciate any tips on how to fix this error. Thanks.
댓글 수: 0
답변 (1개)
Abhijeet
2023년 11월 20일
Hi Semih,
I understand that you are getting error “libmwi18n.dll, libmx.dll, libmat.dll could not be found “ while building a Simulink model with ‘slbuild’ command.
These errors may arise because of outdated build folders. This may lead the ‘packNGo’ to not find the DLL files.
To resolve the issue , I suggest you the following steps :-
I hope this resolves the issue you were facing.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!