Code generation with Matlab Coder fails
2 views (last 30 days)
Show older comments
I'm trying to generate code using Matlab Coder, and I've managed to get to the stage where I generate MEX to test the code. However I'm getting a strange error:
"Build error: Compilation returned error status code 2. See the Target Build Log in the report for further details".
The build log says:
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 -DMX_COMPAT_32 /O2 /Oy- /DNDEBUG /fp:strict /I "C:\PROGRA~1\MATLAB\R2015a\simulink\include" /I "C:\PROGRA~1\MATLAB\R2015a\toolbox\shared\simtargets" /I "C:\test\MATLAB~1" /I "C:\test\MATLAB~1\codegen\mex\filter" /I "C:\test\MATLAB~1\codegen\mex\filter\interface" /I "C:\PROGRA~1\MATLAB\R2015a\extern\include" /I "." "filter_data.c" filter_data.c c1 : fatal error C1083: Cannot open source file: 'filter_data.c': No such file or directory gmake: * [filter_data.obj] Error 2
I have no idea how to solve this (not sure how I should interpret the error log). The 'filter_data.c' file does exist though, in the codegen\mex\filter folder.
2 Comments
Darshan Ramakant Bhat
on 7 Jul 2021
Can you please provide simple reproduction script ? Please try code generation in a writable directory.
Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!