MATLAB Compiler    

Troubleshooting

Troubleshooting mbuild

This section identifies some of the more common problems that might occur when configuring mbuild to create stand-alone applications.

Options File Not Writeable.   When you run mbuild -setup, mbuild makes a copy of the appropriate options file and writes some information to it. If the options file is not writeable, you are asked if you want to overwrite the existing options file. If you choose to do so, the existing options file is copied to a new location and a new options file is created.

Out of Environment Space Running mex or mbuild.   On Windows 98 systems, the mex and mbuild scripts require more than the default amount of environment space. If you get the error, out of environment space, add this line to your config.sys file:

On Windows Me systems, if you encounter this problem and are using the MATLAB add-in for Visual Studio, follow the procedure in Configuring on Windows 98 and Windows Me Systems.

Directory or File Not Writeable.   If a destination directory or file is not writeable, ensure that the permissions are properly set. In certain cases, make sure that the file is not in use.

mbuild Generates Errors.   On UNIX, if you run mbuild filename and get errors, it may be because you are not using the proper options file. Run mbuild -setup to ensure proper compiler and linker settings.

Compiler and/or Linker Not Found.   On PCs running Windows, if you get errors such as unrecognized command or file not found, make sure the command line tools are installed and the path and other environment variables are set correctly in the options file.

mbuild Not a Recognized Command.   If mbuild is not recognized, verify that <MATLAB>\bin is on your path. On UNIX, it may be necessary to rehash.

mbuild Works from Shell but Not from MATLAB (UNIX).   If the command

works from the UNIX command prompt but 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 environment variable, an error may occur. You can test this by performing a

prior to launching MATLAB. If this works correctly, then you should check your .cshrc file for problems setting the PATH environment variable.

Cannot Locate Your Compiler (PC).   If mbuild has difficulty locating your installed compilers, it is useful to know how it goes about finding compilers. mbuild automatically detects your installed compilers by first searching for locations specified in the following environment variables:

Next, mbuild searches the Windows registry for compiler entries.

Internal Error When Using mbuild -setup (PC).   Some antivirus software packages such as Cheyenne AntiVirus and Dr. Solomon may conflict with the mbuild -setup process. If you get an error message during mbuild -setup of the following form

then you need to disable your antivirus software temporarily and rerun mbuild -setup. After you have successfully run the setup option, you can reenable your antivirus software.

Verification of mbuild Fails.   If none of the previous solutions addresses your difficulty with mbuild, contact Technical Support at The MathWorks at support@mathworks.com.


  Building Excel Plug-Ins Troubleshooting the Compiler