| MATLAB Compiler | ![]() |
C Shared Library
In this example, the Compiler takes the M-files foo.m and bar.m as input and generates a C shared library called libfoo.
mcc -W lib:libfoo -T link:lib foo.m bar.m
| File |
Description |
|---|---|
libfoo.c |
The library wrapper C source file containing the exported functions of the library representing the C interface to the the two M-functions (foo.m and bar.m) as well as library initialization code. |
libfoo.h |
The library wrapper header file. This file is included by applications 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 library. This data includes path information, encryption keys, and other initialization for the MCR. |
libfoo.exports |
The exports file used by mbuild 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 and bar.m). This file also contains other files called by the two main M-files as well as any other executable content and data files needed at run-time. |
libfoo |
The shared library binary file. On Windows, this file is libfoo.dll. On Solaris, this file is libfoo.so. (Note: UNIX extensions vary depending on the platform. See the External Interfaces documentation for additional information.) |
| Input and Output Files | C++ Shared Library | ![]() |
© 1994-2005 The MathWorks, Inc.