MATLAB: Do I receive an NMAKE U1065 error when compiling a model with Microsoft Visual Studio and Real-Time Workshop

:'-'errorfatalinvalidmakeflagsmsvcnmakeoptionsimulink coderu1065

When I generate code from my model and compile the code using Microsoft Visual Studio, I receive an NMAKE error.

Best Answer

The U1065 error with NMAKE is a generic error which indicates that an invalid option was supplied to some portion of the compilation process. NMAKE is part of Microsoft Visual Studio.
This error can result from numerous environment settings. Some potential sources of erroneous or incompatible settings are listed below.
Check the Compiler Options setting by opening "Simulation > Configuration Parameters", navigating to the Real-Time Workshop section, and checking the "Make Command" entry. By default, this will read:
make_rtw
Check any additional compiler options specified in this field for validity with Microsoft Visual Studio.
In addition, examine your Windows environment variables, as some variables, including MAKEFLAGS, are passed directly to NMAKE and can affect compilation.
Related Question