mexHelp - MEX Compile MEX-function Usage mex[options...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
MEX Compile MEX-function Usage: mex [options . ..] file [files . ..] Description: MEX compiles and links source files into a shared library called a MEX-file, executable from within MATLAB. The resulting file has a platform-dependent extension. Use the MEXEXT command to return the extension for this machine or for all supported platforms. MEX accepts any combinations of source files, object files, and library files as arguments. The command line options to MEX are defined in the "Command Line Options" section below. MEX can also build executable files for stand-alone MATLAB engine and MAT-file applications. See the "Engine/MAT Stand-alone Application Details" below for more information. You can run MEX from the MATLAB Command Prompt, Windows Command Prompt, or the UNIX shell. MEX is a script named mex.bat on Windows and mex on UNIX, and is located in the directory specified by [matlabroot '/bin']. The first file name given (less any file name extension) will be the name of the resulting MEX-file. Additional source, object, or library files can be given to satisfy external references. On UNIX, both C and Fortran source files can be specified when building a MEX-file. If C and Fortran are mixed, the first source file given determines the entry point exported from the MEX-file (MATLAB loads and runs a different entry point symbol for C or Fortran MEX-files). MEX uses an options file to specify variables and values that are passed as arguments to the compiler, linker, and other tools (e.g. the resource linker on Windows). Command line options to MEX may supplement or override contents of the options file, or they may control other aspects of MEX's behavior. For more information see the "Options File Details" section below. The -setup option causes MEX to search for installed compilers and allows you to choose an options file as the default for future invocations of MEX. For a list of compilers supported with this release, refer to the Supported and Compatible Compiler List at: Command Line Options Available on All Platforms:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 01/17/2011.

Page1 / 4

mexHelp - MEX Compile MEX-function Usage mex[options...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online