MATLAB Compiler Previous page   Next Page
%#external

Pragma to call arbitrary C/C++ functions from your M-code

Syntax

Description

The %#external pragma informs the MATLAB Compiler that the implementation version of the function (Mlxf) will be hand written and will not be generated from the M-code. This pragma affects only the single function in which it appears, and any M-function may contain this pragma (local, global, private, or method).

When using this pragma, the Compiler will generate an additional header file called fcn_external.h, where fcn is the name of the initial M-function containing the %#external pragma. This header file will contain the extern declaration of the function that the user must provide. This function must conform to the same interface as the Compiler-generated code. For more information on the %#external pragma, see Interfacing M-Code to C/C++ Code.


Previous page  Functions -- Categorical List %#function Next page

© 1994-2005 The MathWorks, Inc.