MATLAB: Do I get the error “Error using ==> make_rtw” when building the XPCOSC demo model for XPC Target version 1.2 (R12.1)

1.2r12r12.1targetxpcxPC TargetBox

Why do I get the following error when trying to build the XPCOSC demo model for XPC Target version 1.2 (R12.1)?
Error executing build command: Error using ==> make_rtw
Error using ==> rtw_c (SetupForVisual)
Microsoft Visual C/C++, Version 4.2 is not supported please upgrade your Visual installation
But we are not using MSVC 4.2; we are using MSVC 6.0. Why is this error occuring?

Best Answer

These errors are usually due to a configuration problem. Please try resetting the compiler path with the following instructions:
1. Type "xpcsetup" at the MATLAB prompt.
2. Set the compiler path correctly in the "compiler path" box.
3. Click "update".