Input and Output Files

Standalone Executable

In this example, MATLAB Compiler takes the M-files foo.m and bar.m as input and generates a standalone called foo.

mcc -m foo.m bar.m

File

Description

foo_main.c

The main-wrapper C source file containing the program's main function. The main function takes the input arguments that are passed on the command line and passes them as strings to the foo function.

foo_mcc_component_data.c

C source file containing data needed by the MCR to run the application. This data includes path information, encryption keys, and other initialization information for the MCR.

foo

The main file of the application. This file reads and executes the content stored in the embedded CTF archive. On Windows, this file is foo.exe.

C Shared Library

In this example, MATLAB 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 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.

libfooThe 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.

libname.exp

Exports file used by the linker. The linker uses the export file to build a program that contains exports, usually a dynamic-link library (.dll). The import library is used to resolve references to those exports in other programs.

libname.lib

Import library. An import library is used to validate that a certain identifier is legal, and will be present in the program when the .dll is loaded. The linker uses the information from the import library to build the lookup table for using identifiers that are not included in the .dll. When an application or .dll is linked, an import library may be generated, which will be used for all future .dlls that depend on the symbols in the application or .dll.

C++ Shared Library

In this example, MATLAB Compiler takes the M-files foo.m and bar.m as input and generates 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 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

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.

libname.exp

Exports file used by the linker. The linker uses the export file to build a program that contains exports (usually a dynamic-link library (.dll). The import library is used to resolve references to those exports in other programs.

libname.lib

Import library. An import library is used to validate that a certain identifier is legal, and will be present in the program when the .dll is loaded. The linker uses the information from the import library to build the lookup table for using identifiers that are not included in the .dll. When an application or .dll is linked, an import library may be generated, which will need to be used for all future .dlls that depend on the symbols in the application or .dll.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS