0
votes

I am trying to run a Simulink model in 'accelerator' mode. When I start the simulation it starts compiling things the I get this error:

### Compiling xxxxxxxxxx_acc.c
C:\Program Files\MATLAB\R2011a\bin\mex -c -win32 OPTIMFLAGS="/Od /Oy- /DNDEBUG" -f C:\Users\Gui\AppData\Roaming\MATHWO~1\MATLAB\R2011a\mexopts.bat xxxxxxxxxx_acc.c
'C:\Program' is not recognized as an internal or external command, operable program or batch file.
NMAKE : fatal error U1077: 'C:\Program' : return code '0x1'
Stop.

Seems the space in 'Program files' is the culprit.

Anyone knows how to fix this?

1
Did you run, mex -setup? Seems like I've run into this before. Sounds like mex is using the wrong compiler. Do you have xPC installed?macduff

1 Answers

0
votes

Wrap the path in quotes:

"C:\Program Files\MATLAB\R2011a\bin\mex" -c  -win32  OPTIMFLAGS="/Od /Oy- /DNDEBUG"  -f C:\Users\Gui\AppData\Roaming\MATHWO~1\MATLAB\R2011a\mexopts.bat  xxxxxxxxxx_acc.c