User`s guide

Input and Output Files
C++ Shared Libra
ry
In this example,
MATLAB C ompiler takes the M-files
foo.m and bar.m as
input and genera
tes a C++ shared library called
libfoo.
mcc -W cpplib:libfoo -T link:lib foo.m bar.m
File Description
libfoo.cpp
The library wrapper C++ source file containing
the exported functions of the library representing
the C++ interface to the two M -functions (
foo.m
and bar .m) as well as libra ry initialization code.
libfoo.h
The library wrapper header file. This file is
included by applicat ions that call the exported
functions of
libfoo.
libfoo_mcc_
component_data.c
C++ source file containing data needed by the
MCR to initialize and use the libr ary. This data
includes path information, encryption keys, and
other initialization for the MCR.
libfoo.exp
orts
The exports file used by mbuil d to link the library.
libfoo.ctf
The CTF archive. This file contains a compressed
and encrypted archive of the M-files that make
up the library (
foo.m an d bar.m). This file also
contains other files called by the two main M-files
as well as an y other content and d ata file s needed
at run-time.
libfoo
The shared library binary file. On Windows,
this file is
libfoo.dll.OnSolaris,thisfileis
libfoo.so.
Note UNIX extensions vary depending on
the platform. See the External Interfaces
documentation for addition al inform a tion.
3-9