User`s manual

Building MEX-Files
1-13
Options files control which compiler to use, the compiler and
link command options, and the runtime libraries to link
against.
To override the default options file, use the 'mex -f' command
(see 'mex -help' for more information).
The options files available for mex are:
1: <matlab>/bin/gccopts.sh :
Template Options file for building gcc MEXfiles
2: <matlab>/bin/mexopts.sh :
Template Options file for building MEXfiles using the
system ANSI compiler
Enter the number of the options file to use as your default options
file:
Select the proper options file for your system by entering its number and
pressing
Return. If an options file doesn’t exist in your MATLAB directory, the
system displays a message stating that the options file is being copied to your
user-specific
matlab directory. If an options file already exists in your matlab
directory, the system prompts you to overwrite it.
Note The setup option creates a user-specific matlab directory in your
individual home directory and copies the appropriate options file to the
directory. (If the directory already exists, a new one is not created.) This
matlab directory is used for your individual options files only; each user can
have his or her own default options files (other MATLAB products may place
options files in this directory). Do not confuse these user-specific
matlab
directories with the system
matlab directory, where MATLAB is installed. To
see the name of this directory on your machine, use the MATLAB command
prefdir.
Using the setup option resets your default compiler so that the new compiler is
used every time you use the
mex script.