User`s guide
Troubleshooting
2-27
works from the UNIX shell prompt b ut does not work from the MATLAB
prompt, you may have a problem with your
.cshrc file. When MATLAB
launches a new C shell to perform compilations, it executes the
.cshrc script.
If this script causes unexpected changes to the
PATH, an e rror may occur. You
can test whether this is true by performing a
set SHELL=/bin/sh
prior to launching MATLAB. If this works correctly, then you should check
your
.cshrc file for problems setting the PATH.
Cannot Locate Your Compiler (PC). If mex has difficulty locating your installed
compilers, it i s us eful to know how it goes about finding compilers.
mex
automatically detects your installed compilers by first searching for locations
specified in the follo w ing environment va riables.
•
BORLAND for Borland C++ Com piler, Version 5.0, 5.2, or 5.3
•
WATCOM for the Watcom C/C+ + Compiler
•
MSVCDIR for Microsoft Visual C/C++, Version 5.0 or 6.0
•
MSDEVDIR for Microsoft Visual C/C++, Version 4.2
Next,
mex searches the W indows Registry for compiler entries. Note that
Watcom does not add an entry to the registry. Digital Fortran does not use an
environment variable;
mex only looks for it in the registry.
Internal Error When Using mex -setup (PC). Some antivirus software packages such
as Cheyenne AntiVirus and Dr. Solomon may conflict with the
mex -setup
process. If you get an error message during mex -setup of the following form
mex.bat: internal error in sub get_compiler_info(): don't
recognize <string>
then you need to disable your antivirus software temporarily and rerun
mex -setup. After you have successfully run the setup option, you can
re-enable your antivirus software.
Verification of mex Fails. If none of the previous solutions addresses your
difficulty with
mex, contact Technical Support at The MathWorks at
support@mathworks.com.