Why is the "codegen" command failing with the error message “ninja: build stopped”?
Show older comments
I am attempting to generate a MEX file from MATLAB code using MATLAB Coder.
Every time I execute the "codegen" command to build a MEX file, I get a long list of OBJ files that failed and an error message from ninja that the build stopped. For example, see the following error message snippet:
FAILED: build/win64/c_mexapi_version.obj
cl /c /Zp8 /GR /W3 /EHs /nologo /MD /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /DMATLAB_MEX_FILE /O2 /Oy- /DNDEBUG /fp:strict /I "." /I "D:\matlabTestLib" /I ".\interface" /I "C:\Program Files\MATLAB\R2020b\extern\include" /I "." -DMODEL=MTL_mex "C:\Program Files\MATLAB\R2020b\extern\version\c_mexapi_version.c" /Fobuild\win64\c_mexapi_version.obj
CreateProcess failed: The system cannot find the file specified.
ninja: build stopped: subcommand failed.
------------------------------------------------------------------------
??? Build error: C compiler produced errors. See the Build Log for further details.
More information
Code generation failed: View Error Report
Error using codegen
Why do I get this error message, and how can I generate code without this error?
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB 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!