First, enter:
Mbuild-Setup
Then several existing compilers (such as Vc) are displayed)
However, if you select one of them, the following problems may occur:
Usage:
Mbuild [option1... optionn] sourcefile1 [... sourcefilen]
[Objectfile1... objectfilen] [libraryfile1... libraryfilen]
[Exportfile1... exportfilen]
Use the-help option for more information, or consult the MATLAB Compiler
User's Guide.
C: \ progra ~ 1 \ MATLAB \ r2012a \ bin \ Mex. Pl: Error: No file names given.
Undefined function or variable 'setup '.
This is because a space should be added between mbuild and-setup:
Therefore, the correct input is:
> Mbuild-Setup
Welcome to mbuild-setup. This utility will help you set up
A default compiler. For a list of supported compilers, see
Http://www.mathworks.com/support/compilers/R2012a/win32.html
Please choose your compiler for building shared libraries or COM components:
Wocould you like mbuild to locate installed compilers [y]/n? Y
Select a compiler:
[1] Lcc-win32 C 2.4.1 In c: \ progra ~ 1 \ MATLAB \ r2012a \ sys \ KP
[2] Microsoft Visual C ++ 2010 in c: \ Program Files \ Microsoft Visual Studio 10.0
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C + + 2010
Location: C: \ Program Files \ Microsoft Visual Studio 10.0
Are these correct [y]/n? Y
**************************************** ************************************
Warning: Applications/components generated using Microsoft Visual C ++
2010 require that the Microsoft Visual Studio 2010 Run-Time
Libraries be available on the computer used for deployment.
To redistribute your applications/components, be sure that
Deployment machine has these run-time libraries.
**************************************** ************************************
Trying to update options file: C: \ Users \ Dong \ appdata \ roaming \ Mathworks \ MATLAB \ r2012a \ compopts. bat
From template: C: \ progra ~ 1 \ MATLAB \ r2012a \ bin \ Win32 \ mbuildopts \ msvc100compp. bat
Done...
>
For lower-version MATLAB, you can enter:
Comtool
However, in a later version, comtool is replaced by deploytool. Therefore
> Comtool
Undefined function or variable 'comtool '.
Therefore, enter:
Deploytool
The com compiler will appear ~~
You can also open the compiler in the menu:
File new deployment project