User`s guide
7 Libraries
where mylibrary mfil e isthenameofanM-fileyouwouldliketousewhen
loading this library. T his step only needs to be performed once to generate an
M-file for the library.
Inthecodethatisbecompiled,youcannowcall
loadlibrary with the
following syntax:
loadlibrary(library, @mylibrarymfile, 'ali as', alias)
With MATLAB Compiler versions 4.0.1 (R14+) and later, generated M-files
will automatically be included in the CTF file as part of the compilatio n
process. For MATLAB C ompiler versions 4.0 (R14) a nd later, include your
library M-file in the compilation with the
-a option with mcc.
Caution With MATLAB Com piler Version 3.0 (R13SP1) and earlier, you
cannot compile calls to
loadlibrary because of general restrictions and
limitations of MATLAB C ompiler.
Note You can use your operating system’s loadlibrary function to call
a MATLAB Compiler shared library function as long as you first call the
initialization and termination functions
mclInitializeApplication() and
mclTerminateApplication().
7-16