User`s guide

8 Troubleshooting
mbuild
This section identifies some of the more common p roblems that might occur
when configuring
mbuild to create standalone applications.
Options File Not Writeable. When you run
mbuild -setup, m buil d 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 option s file. If you choose to do so, the existing opti on s fi le is copied to
a new location and a new o ptions file is created.
Directory or Fil e Not Writeable. If a destination directory or file is n ot
writeable, ensure that the permissions are properly set.Incertaincases,
make sure that the file is not in use.
mbuild Genera tes Errors. 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 se ttings.
Compiler and/or Linker Not Found. On Windows, if you g et 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. For MS Visual Studio, for example, make sure to
run
vcvars32.bat (MSVC 6.x and earlier) or vsvars32 .bat (MSVC 7.x).
mbuild N ot a Recognized C o mmand. If
mbuild is not recognized, verify
that
matlabroot\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
mcc -m hello
works from the UN IX command prompt but does not work fro m the M ATLAB
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
set SHELL=/bin/sh
8-2