User`s guide

mbuild
7-20
7mbuild
Purpose Compile and link source files that call functions in the MATLAB C/C++ Math
Library or MATLAB C/C++ Graphics Library into a stand-alone executable or
shared library
Syntax mbuild [option1 ... optionN] sourcefile1 [... sourcefileN]
[objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]
[exportfile1 ... exportfileN]
Note Supported types of source files are: .c, .cpp, .idl, .rc. To specify IDL
source files to be compiled with the MIDL Compiler, add
<filename>.idl to
the
mbuild command line; to specify a DEF file, add <filename>.def to the
command line; to specify an RC file, add
<filename>.rc to the command line.
Source files that are not one of the supported types are passed to the linker.
Description mbuild is a script that supports various options that allow you to customize the
building and linking of your code. Table 7-1, mbuild Options, lists the
mbuild
options. If no platform is listed, the option is available on both UNIX and
Microsoft Windows.
Table 7-1: mbuild Options
Option Description
-<arch>
(UNIX) Assume local host has architecture
<arch>. Possible values for <arch> include
sol2, hpux, hp700, alpha, ibm_rs, sgi, and
glnx86.
@<response_file>
(Windows) Replace @<response_file> on the
mbuild command line with the contents of the
text file,
response_file.
-c
Compile only. Do not link. Creates an object file
but not an executable.
-D<name>
Define a symbol name to the C/C++
preprocessor. Equivalent to a
#define <name>
directive in the source.