User`s guide

%#external
Purpose Pragma to call arbitrary C/C++ function s from M -code
Syntax %#external
Description The %#external pragma informs MATLAB Compiler that the
implementation version of the function (
Mlxf)willbehandwrittenand
not generated from the M-code. This pragma affects only the single
functi on in which it appears, and any M-function may contain this
pragma (local, global, private, or method).
Note If you compile a program that contains the %#external pragma,
youmustexplicitlypasseachfilethatcontainsthispragmaonthe
mcc
command line.
When using this pragma, MATLAB Compiler will generate an
additional header file called
fcn_external.h,wherefcn 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 m ust provide. This function must conform to the same interface
as code generate d by MATLAB Compiler. For more information on the
%#external pragma, see “Interfacing M-Code to C/C++ Code” on page
5-13.
11-2