External Interfaces/API | ![]() ![]() |
Default Options File on Windows
The default MEX options file is placed in your user profile
directory after you configure your system by running mex -setup
. The mex
script searches for an options file called mexopts.bat
in the following order:
user profile
directory. See the following section, "The User Profile Directory", for more information about this directory<matlab>\bin\win32\mexopts
mex
uses the first occurrence of the options file it finds. If no options file is found, mex
searches your machine for a supported C compiler and automatically configures itself to use that compiler. Also, during the configuration process, it copies the compiler's default options file to the user profile
directory. If multiple compilers are found, you are prompted to select one.
For specific information on the default settings for the MATLAB supported compilers, you can examine the options file, mexopts.bat
, or you can invoke the mex
script in verbose mode (-v
). Verbose mode will print the exact compiler options, prelink commands, if appropriate, and linker options used in the build process for each compiler. Custom Building on Windows gives an overview of the high-level build process.
The User Profile Directory
The Windows user profile
directory is a directory that contains user-specific information such as desktop appearance, recently used files, and Start menu items. The mex
and mbuild
utilities store their respective options files, mexopts.bat
and compopts.bat
, which are created during the -setup
process, in a subdirectory of your user profile
directory, named Application Data\MathWorks\MATLAB
. Under Windows NT and Windows 95/98 with user profiles enabled, your user profile
directory is %windir%\Profiles\username
. Under Windows 95/98 with user profiles disabled, your user profile
directory is %windir%
. Under Windows 95/98, you can determine whether or not user profiles are enabled by using the Passwords control panel.
![]() | Default Options File on UNIX | Custom Building on UNIX | ![]() |