User`s manual
Compiling and Linking Engine Programs
4-19
Compiling and Linking
MATLAB provides an options file, engopts.sh, that lets you use the mex script
to easily compile and link engine applications. For example, to compile and link
the
engdemo.c example, you can use
mex -f <matlab>/bin/engopts.sh <pathname>/engdemo.c
where <pathname> specifies the complete path to the specified file.
If you need to modify the options file for your particular compiler or platform,
use the
-v switch to view the current compiler and linker settings and then
make the appropriate changes in a local copy of the
engopts.sh file.
Compiling and Linking on Windows
To compile and link engine programs, use the mex script with an engine options
file. Table 1-2, Options Files, on page 1-17 lists the engine options files
included in this release. All of these options files are located in
<
matlab>\bin\win32\mexopts.
As an example, to compile and link the stand-alone engine application
engwindemo.c on Windows using MSVC (Version 5.0), use
mex -f <matlab>\bin\win32\mexopts\msvc50engmatopts.bat ...
<pathname>\engwindemo.c
where <pathname> specifies the complete path to the specified file. If you need
to modify the options file for your particular compiler, use the
-v switch to view
the current compiler and linker settings and then make the appropriate
changes in the options file.