In this particular case, the value of the environment variables TEMP and TMP on the user's machine was set to:
TEMP=C:\DOCUME~1\WEBERJE\LOCAL SETTINGS\TEMP
TMP=C:\DOCUME~1\WEBERJE\LOCAL SETTINGS\TEMP
There is a 'space' character between the words 'Local' and 'Settings' and thus the name 'Local Settings' was not returned in a shortened format by the machine to the compiler. So, the temporary directory where the linker was apparently looking for the required libraries was:
'C:\DOCUME~1\WEBERJE\LOCAL'
instead of:
'C:\DOCUME~1\WEBERJE\LOCAL SETTINGS'
This explains the error message that was generated when running the MEX command:
LINK : fatal error LNK1104: cannot open file 'C:\DOCUME~1\WEBERJE\LOCAL'
To workaround this issue, change the environment variables TEMP and TMP to some directory that does not contain spaces. For example, set the TEMP and TMP environment variables to:
NOTE: Ensure that such a directory exists and has write permissions for all users who are running the MEX command.
Best Answer