User`s guide
Building Stand-Alone Applications on PCs
4-21
Combining Customized C and C++ Options Files. The options files for mbuild have
changed as of MATLAB 5.3 (Release 11) so that the same options file can be
used to create both C and C++ stand-alone applications. If you have modified
your own separate options files to create C and C++ applications, you can
combine them into one options file.
To combine your existing options files into one universal C and C++ options file:
1 Copy from the C++ options file to the C options file all lines that set the
variables
COMPFLAGS, OPTIMFLAGS, DEBUGFLAGS, and LINKFLAGS.
2 In the C options file, within just those copied lines from step 1, replace all
occurrences of:
-
COMPFLAGS with CPPCOMPFLAGS
- OPTIMFLAGS with CPPOPTIMFLAGS
- DEBUGFLAGS with CPPDEBUGFLAGS
- LINKFLAGS with CPPLINKFLAGS.
This process modifies your C options file to be a universal C/C++ options file.
Temporarily Changing the Compiler. To temporarily change your C or C++ compiler,
use the
-f option, as in
mbuild -f <file>
The -f option tells the mbuild script to use the options file, <file>. If <file>
is not in the current directory, then
<file> must be the full pathname to the
desired options file. Using the
-f option tells the mbuild script to use the
specified options file for the current execution of
mbuild only; it does not reset
the default compiler.
Microsoft Visual C/C++, Version 6.0
msvc60compp.bat
Microsoft Visual C/C++, Version 7.0
msvc70compp.bat
Table 4-3: Compiler Options Files on the PC (Continued)
Compiler Master Options File