User`s guide
Building Stand-Alone Applications on PCs
4-17
Note Yo u c an o verrid e the language choice that is determined f rom the
extension by using the
-lang option of mbuild. For more informat io n abo ut
this option, a s well as all of the other
mbuild options, see the mbuild reference
page.
Locating Options Files
To locate your options file, the mbuild script searches the following:
•T he current directory
•The
user profile directory (For more information about this directory, see
the section, “The User Profile Directory Under Windows,” in Chapter 2.)
mbuild uses the first occurrence of the options file it finds. If no options file is
found,
mbuild searches your machine for a supported C compiler and uses the
facto ry defau lt options file for that compi ler . If multipl e compile rs are fou nd,
you are prompt ed to select one.
Preparing to Compile
Note Refer to “Supported A N S I C and C++ PC Co mp ile rs” on page 2 -1 5 f o r
information about s uppo rted compil ers and important limitations. Wat com
10.6 and 11 a re not s upp orted for building stand -alo ne applications.
Choosing a Compiler
Systems with Exactly One C/C++ Compiler. If the MATLAB Compiler and your
supporte d C or C++ co m p iler are ins talled on your syst em, you are read y to
create C or C++ stand-alone app lications. On systems wh e r e there is e xactly
one C or C++ compiler available to you, the
mbuild utility automat ically
configures it se lf for the ap p rop riate com p iler. So, for many users, to create a C
or C++ stand-alone applications, y ou can simply enter
mbuild filename.c