
1. Create a text file containing the text -I dir name for each directory you want on
the default path, and name this file mccpath.
2. Place this file in your preferences directory. To do so, run the following commands
at the MATLAB prompt:
cd(prefdir)
mccsavepath
The stand-alone version of the MATLAB Compiler searches for the mccpath file in your
current directory and then your preferences directory. Note that you may still use the
-I option on the command line to add other directories to the search path. Directories
specified this way are searched after those directories specified in the mccpath file.
2.5 MBUILD
MBUILD compiles and links source co de files that call functions in the MATLAB C/C++
Math Library and/or Graphics Library into a stand-alone executable or a shared library.
Because MB UILD does nothing else than invoking the ANSI C or C++ compiler, we used
MBUILD only for debugging reasons to determine which libraries we needed to link with:
mbuild -n -Iusr incl dir/ -Lusr lib dir main.c -lusr lib 1 -lusr lib 2 ...
When specifying the -n option, MBUILD sets up the compile and link command lines
necessary to build a stand-alone application but does not execute the commands. View
the output of mbuild -n to determine the list of libraries you must link your application
with and the order in which you must specify them. Therefore MBUILD may be a good
tool for porting C/C++ source code from Windows to Linux and vice versa.
For more detailed information about MBUILD refer to [4] or call mbuild -help from the
Linux command line.
5
Commenti su questo manuale