Skip to Main Content Skip to Search
Product Documentation

Input and Output Files

Standalone Executable

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

mcc -m foo.m bar.m

File

Description

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.

run_component.sh

mcc generates run_<component>.sh file on UNIX (including Mac) systems for standalone applications. It temporarily sets up the environment variables needed at runtime and executes the application. On Windows, mcc doesn't generate this run script file, because the environment variables have already been set up by the installer. In this case, you just run your standalone .exe file.

C Shared Library

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

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

    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.

Macintosh 64 (Maci64)

For 64-bit Macintosh, a Macintosh application bundle is created.

File

Description

foo.app

The bundle created for executable foo. Execution of the bundle occurs through foo.app/Contents/MacOS/foo.

foo

Application

run_component.sh

The generated shell script which executes the application through the bundle.

  


Free MATLAB Compiler Interactive Kit

Learn how to build standalone executables and C/C++ shared libraries from MATLAB code.


Get free kit

Trials Available

Try the latest version of MATLAB Compiler.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS