MATLAB Compiler | ![]() ![]() |
Building Stand-Alone Applications on PCs
This section explains how to compile and link the C/C++ code generated from the MATLAB Compiler into a stand-alone Windows application. This section includes
Configuring for C or C++
mbuild
determines whether to compile in C or C++ by examining the type of files you are compiling. Table 4-2, Windows File Extensions for mbuild, shows the file extensions that mbuild
interprets as indicating C or C++ files.
Language |
Extension(s) |
C |
.c |
C++ |
.cpp |
mbuild
uses the C++ compiler and the MATLAB C++ Math Library.
mbuild
cannot deduce from the file extensions whether to compile in C or C++, mbuild
invokes the C compiler.
Note
You can override the language choice that is determined from the extension by using the -lang option of mbuild . For more information about this option, as 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:
user profile
directory (For more information about this directory, see The User Profile Directory Under Windows.)
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 factory default options file for that compiler. If multiple compilers are found, you are prompted to select one.
![]() | Packaging UNIX Applications | Preparing to Compile | ![]() |