User`s guide

4 Stand-Alone Applications
4-24
About the mbuild Script
The mbuild script supports various options that allow you to customize the
building and linking of your code. Many users do not need to know any
additional details of the
mbuild script; they use it in its simplest form. For
complete information about the mbuild script and its options, see
mbuild on
page 7-25.
Using an IDE
TheMathWorksprovidesa MATLABadd-infortheVisualStudiodevelopment
system that lets you work easily within Microsoft Visual C/C++ (MSVC). The
MATLAB add-in for Visual StudiogreatlysimplifiesusingM-files intheMSVC
environment. The add-in automates the integration of M-files into Visual C++
projects. It is fully integrated with the MSVC environment.
The add-in for Visual Studio is automatically installed on your system when
you run either
mbuild -setup ormex -setup andselect MicrosoftVisualC/C++
version 5 or 6. However, there are several steps you must follow in order to use
the add-in:
1 To build MEX-files with the add-in for Visual Studio, run the following
command at the MATLAB command prompt.
mex -setup
Follow the menus and choose either Microsoft Visual C/C++ 5.0 or 6.0. This
configures
mex to use the selected Microsoft compiler and also installs the
necessary add-in files in your Mi crosoft Visual C/C++ directories.
2 To build stand-alone applications with the MATLAB add-in for Visual
Studio (requires the MATLAB Compiler a nd the MATLAB C/C++ Math
Libraries), run the following command at the MATLAB command prompt.
mbuild -setup
Follow the menus and choose either Microsoft Visual C/C++ 5.0 or 6.0. This
configures
mbuild tousetheselected Microsoft compiler andalsoinstallsthe
necessaryadd-infiles into yourMicrosoftV isual C/C++ directories. (It is not
a problem if these overlap with the files installed by the
mex -setup
command.)