When I try to run the MEX -SETUP command from within MATLAB 7.1 (R14SP3), why do I receive errors?

I have installed MATLAB into a folder that has 'bin' in its path (for example, C:/_virdrv_E/bin/matlabR14sp3). When I try to execute MEX -SETUP, I receive the following errors
Can't locate mexsetup.pm in @INC (@INC contains:
C:\_virdrv_E/sys/perl/win32/lib C:\_virdrv_E/sys/perl/win32/site/lib
C:/_virdrv_E/bin/matlabR14sp3/sys/perl/win32/lib
C:/_virdrv_E/bin/matlabR14sp3/sys/perl/win32/site/lib . C:\_virdrv_E/bin)
at
C:\_virdrv_E\bin\matlabR14sp3\bin\mex.pl line 203.
BEGIN failed--compilation aborted at
C:\_virdrv_E\bin\matlabR14sp3\bin\mex.pl line 203.
??? Error using ==> mex
Unable to complete successfully

 Accepted Answer

This bug has been fixed in Release 2006a (R2006a). For previous product releases, read below for any possible workarounds:
There is a bug in MATLAB 7.1 (R14SP3) in the way that MATLAB handles installed directories that have 'bin' in their path. To work around this issue, follow the steps given below.
In $MATLABROOT\bin (where $MATLABROOT is the folder in which you installed MATLAB), open 'mex.pl' and change the following lines (160 - 162)
if ($f =~ s%^bin[\\/].*%%) {
$f = '.';
} elsif ($f =~ s%[\\/]bin[\\/].*%%) {
to
if ($f =~ s%^bin[\\/]mex.pl$%%) {
$f = '.';
} elsif ($f =~ s%[\\/]bin[\\/]mex.pl$%%) {
Save the file, then close and restart MATLAB.

More Answers (0)

Categories

Products

Release

R14SP1

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!