- 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
21 次查看(过去 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!