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 for run-time issues. 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. It works fine when changing the compiler to lcc, but I'd rather not use that, since in the end I would like to generate C++ code which is not possible with lcc.
"filter_data.c" filter_data.c
. Try to remove this part and specify instead the full path to the source file inside quotation marks. – Hadi Brais Jun 25 at 16:25