MATLAB Compiler Previous page   Next Page

Using Pragmas

Using feval

In stand-alone C and C++ modes, the pragma

informs the MATLAB Compiler that the specified function(s) should be included in the compilation, whether or not the Compiler's dependency analysis detects it. Without this pragma, the Compiler's dependency analysis will not be able to locate and compile all M-files used in your application.

You cannot use the %#function pragma to refer to functions that are not available in M-code.

Example - Using %#function

A good coding technique involves using %#function in your code wherever you use feval statements. This example shows how to use this technique to help the Compiler find the appropriate files during compile time, eliminating the need to include all the files on the command line.


Previous page  Interfacing M-Code to C/C++ Code Script Files Next page

© 1994-2005 The MathWorks, Inc.