This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
This problem has been fixed in Real-Time Workshop 6.2 (R14SP2). If you are using a previous version, read the following:
We have verified there is a bug in Real-Time Workshop 6.1 (R14SP1) in that certain targets use the -f flag incorrectly when calling MEX to compile the model. The -f flag is used to hardcode the location of the preferences file in the template make files (TMFs), and for these targets, that location is hardcoded as a file located in the following directory:
$MATLAB\bin\win32\mexopts\
(where $MATLAB is the MATLAB root directory on your machine, as returned by typing
at the MATLAB command prompt.)
As a workaround, edit the appropriate TMF file to add the desired compiler options. To find this file, navigate to the following directory:
$MATLAB\rtw\c
In that directory, you will see several directories named similarly to the targets they represent. Change to the directory of interest, and then edit the .tmf file representing the compiler you are using. For example, if you want to change the options for the Accelerator and you are using Visual C++, you would edit the following file:
$MATLAB\rtw\c\accel\accel_vc.tmf
In the TMF, you will see the following line:
This is the line you would add the desired options to.
Best Answer