Error using MEX (line 206)

I have been having issues running the accelerator mode of various Simulink models. This issue persists on 32bit and 64bit (I have installed the windows compiler for 64bit) MATLAB, along with newer and older versions (I am current working in R2012A). The weird thing is that smaller models have no issues compiling while larger models return an error indicating the accelerator mode compilation was aborted due to a MEX issue. I recently tried to initiate the MEX command in the command window to see what compiler I had selected only to find that it will not initiated the prompt and returns this error.
C:\PROGRA~2\MATLAB\R2012A\BIN\MEX.PL: Error: MEX failed to create a temporary
directory. The directory "C:\Users\MYUSERNAME\AppData\Local\Temp"
defined by the environment variable %TEMP% either does not exist
or is not writable. Consider changing %TEMP% to a writable directory,
for example "C:\temp".
I am somewhat baffled by this. The current temp folder for matlab and using
!echo %TEMP%
returns the same path as
echo %TEMP%
in the windows command prompt. The temp folder is writable as well. I also created a secondary %TEMP% environmental variable with a different path. Same issues. Any input on my problem?
Thanks
Cameron

1 个评论

Could you confirm that %TEMP% is the same as C:\Users\MYUSERNAME\AppData\Local\Temp ?
What are the access rights defined for that directory? Windows Explorer, right-click, look the the security properties (sorry, I do not remember the exact sequence)
Also, at the MATLAB prompt, what does
fileattrib C:\Users\MYUSERNAME\AppData\Local\Temp
return?

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 MATLAB Compiler 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by