Simulink issuing bad command when attempting to build mex file
Show older comments
I'm upgrading a model from Simulink 2020b to 2022b and ran into a problem with a mex build failure. I've simplified the model and attached: example_mex_failure.slx.
If I run the command from the windows command prompt:
> "C:\Program Files\MATLAB\R2022b\bin\win64\mex.exe" -R2018a -silent LD="$MINGWROOT\bin\g++" LDFLAGS="$LDFLAGS ""C:\Program Files\MATLAB\R2022b\bin\win64\libmwdsp_halidesim.dll"" ""C:\Program Files\MATLAB\R2022b\bin\win64\libmwdsp_halidesim.dll""" -output example_mex_failure_sfun.mexw64 @example_mex_failure_sfun.mol
The build of the mex file completes successfully, but please note this differs from the command Matlab attempts:
> "C:\Program Files\MATLAB\R2022b\bin\win64\mex.exe" -R2018a -silent LD="$MINGWROOT\bin\g++" LDFLAGS="$LDFLAGS "C:\Program Files\MATLAB\R2022b\bin\win64\libmwdsp_halidesim.dll" "C:\Program Files\MATLAB\R2022b\bin\win64\libmwdsp_halidesim.dll"" -output example_mex_failure_sfun.mexw64 @example_mex_failure_sfun.mol
Matlab's command seems to omit escaping the nested quotation marks when building a mex file on "Normal" simulations.
Accepted Answer
More Answers (0)
Categories
Find more on Introduction to Installation and Licensing 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!