| MATLAB Compiler | ![]() |
The MathWorks provides a MATLAB add-in for the Visual Studio development system that lets you work easily within Microsoft Visual C/C++ (MSVC). The MATLAB add-in for Visual Studio greatly simplifies using M-files in the MSVC 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 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:
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.
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.)
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 your MATLAB path. If you add directories to your MATLAB path and want them to be visible to the MATLAB add-in, rerun the cd and mccsavepath commands shown in this step and replace prefdir with the desired pathname.
Note
To run the MATLAB add-in for Visual Studio on Windows 95 or Windows 98 systems, add this line to your config.sys file.
|
For additional information on the MATLAB add-in for Visual Studio:
MATLABAddin.hlp file in the <matlab>\bin\win32 directory, or
| Verifying the MATLAB Compiler | Distributing Stand-Alone Windows Applications | ![]() |