User`s manual
1 Calling C and Fortran Programs from MATLAB
1-32
Troubleshooting
This section explains how to troubleshoot some of the more common problems
you may encounter. It addresses the following topics:
•“Configuration Issues”
•“Understanding MEX-File Problems”
•“Compiler and Platform-Specific Issues”
•“Memory Management Compatibility Issues”
Configuration Issues
This section focuses on some common problems that might occur when creating
MEX-files.
Search Path Problem on Windows
Under Windows, if you move the MATLAB executable without reinstalling
MATLAB, you may need to modify
mex.bat to point to the new MATLAB
location.
MATLAB Pathnames Containing Spaces on Windows
If you have problems building MEX-files on Windows and there is a space in
any of the directory names within the MATLAB path, you need to either
reinstall MATLAB into a pathname that contains no spaces or rename the
directory that contains the space. For example, if you install MATLAB under
the
Program Files directory, you may have difficulty building MEX-files with
certain C compilers. Also, if you install MATLAB in a directory such as
MATLAB
V5.2
, you may have difficulty.
DLLs Not on Path on Windows
MATLAB will fail to load MEX-files if it cannot find all DLLs referenced by the
MEX-file; the DLLs must be on the DOS path or in the same directory as the
MEX-file. This is also true for third-party DLLs.
Internal Error When Using mex -setup (PC).
Some antivirus software packages may conflict with the mex -setup process or
other mex commands. If you get an error message of the following form in
response to a mex command,