Borrar filtros
Borrar filtros

libmwi18n.dll, libmx.dll, libmat.dll could not be found when building code with slbuild

22 visualizaciones (últimos 30 días)
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.

Respuestas (1)

Abhijeet
Abhijeet el 20 de Nov. de 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 :-
  • 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.
I hope this resolves the issue you were facing.

Categorías

Más información sobre Embedded Coder en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by