- 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 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Abhijeet
on 20 Nov 2023
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 Comments
See Also
Categories
Find more on Simulink 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!