User`s guide

4 Stand-Alone Applications
4-24
Note The MATLAB add-in for Visual Studio does not currently work with
Microsoft Visual C/C++, Version 7.0.
The add-in for Visual Studio is automatically installed on your system when
you run either
mbuild -setup or mex -setup and select Microsoft Visual C/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 Microsoft Visual C/C++ directories.
2 To build stand-alone applications with the MATLAB add-in for Visual
Studio (requires the MATLAB Compiler and 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 to use the selected Microsoft compiler and also installs the
necessary add-in files into your Microsoft Visual C/C++ directories. (It is not
a problem if these overlap with the files installed by the
mex -setup
command.)
3 For either mex or stand-alone support, you should also run the following
commands at the MATLAB prompt:
cd(prefdir); mccsavepath;
These commands save your current MATLAB path to a file named mccpath
in your
user preferences directory. (Type prefdir to see the name of your
user preferences directory.)
This step is necessary because the MATLAB add-in for Visual Studio runs
outside of the MATLAB environment, so it would have no way to determine