MATLAB COMPILER RELEASE NOTES User's Guide Page 73

  • Download
  • Add to my manuals
  • Print
  • Page
    / 264
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 72
Differences Between MEX-Files and Stand-Alone Applications
4-3
Differences Between MEX-Files and Stand-Alone
Applications
MEX-files and stand-alone applications differ in these respects:
M EX-files run in the same process space as the MATLAB interpreter. When
you invoke a MEX-file, the MATLAB interpreter dynamically links in the
MEX-file.
Stand-alone C or C++ applications run independently of MA TLAB.
MEX-Files
It is now possible to call MEX-files from Compiler-generated stand-alone
applications. The Compiler will compile MEX-files whenever they are specified
on the commandline or are located using the
-h optiontofind helperfunctions.
The MEX-files will then be loaded and called by the stand-alone code.
If an M-file and a MEX-file appear in the same directory and the M-file
contains at least one function, the Compiler will compile the M-file instead of
the MEX-file. If the MEX-file is desired instead, you must use the
%#mex
pragma. For more information on this pragma, see “%#mex” in Chapter 7.
Note The Compiler-generated code cannot invoke Compiler-generated
MEX-file s. Specif y the M-file(s) s ource instead and t he Compiler will compi le
those into the stand-alone appl icat ion.
Stand-Alone C Applications
To build s tand- alo ne C ap p licat ions as described in this chapter, MATL AB, the
MATLAB Com piler, a C compiler, and the MAT LAB C/C++ Math Library must
be installed on your system.
The source code for a stand-alone C application consists either entirely of
M-files or some combination of M-files, MEX-files, and C or C++ source code
files.
Page view 72
1 2 ... 68 69 70 71 72 73 74 75 76 77 78 ... 263 264

Comments to this Manuals

No comments