Main Content

Install an ANSI C or C++ Compiler

Install supported ANSI® C or C++ compiler on your system. Certain output targets require particular compilers.

To install your ANSI C or C++ compiler, follow vendor instructions that accompany your C or C++ compiler.

Note

If you encounter problems relating to the installation or use of your ANSI C or C++ compiler, consult your C or C++ compiler vendor.

Supported ANSI C and C++ Windows Compilers

Use one of the following C/C++ compilers that create Windows® dynamically linked libraries (DLLs) or Windows applications:

  • Microsoft® Visual C++® (MSVC).

    • The only compiler that supports the building of COM objects and Excel® plug-ins is Microsoft Visual C++.

    • The only compiler that supports the building of .NET objects is Microsoft Visual C# Compiler for the Microsoft .NET Framework.

  • Microsoft Windows SDK 7.1

Note

For an up-to-date list of all the compilers supported by MATLAB®, see the MathWorks Technical Support notes at https://www.mathworks.com/support/compilers/current_release/

Supported ANSI C and C++ UNIX Compilers

MATLAB Compiler™ and MATLAB Compiler SDK™ support the native system compilers on:

  • Linux®

  • Linux x86-64

  • Mac OS X

MATLAB Compiler and MATLAB Compiler SDK supports gcc and g++.

Common Installation Issues and Parameters

When you install your C or C++ compiler, you sometimes encounter requests for additional parameters. The following tables provide information about common issues occurring on Windows and UNIX® systems where you sometimes need additional input or consideration.

Windows Operating System

Issue

Comment

Installation options

(Recommended) Full installation.

Installing debugger files

For the purposes of MATLAB Compiler and MATLAB Compiler sdk, it is not necessary to install debugger (DBG) files.

Microsoft Foundation Classes (MFC)

Not needed.

16-bit DLLs

Not needed.

ActiveX®

Not needed.

Running from the command line

Make sure that you select all relevant options for running your compiler from the command line.

Updating the registry

If your installer gives you the option of updating the registry, perform this update.

Installing Microsoft Visual C++ Version 6.0

To change the install location of the compiler, change the location of the Common folder. Do not change the location of the VC98 folder from its default setting.

UNIX Operating System

Issue

Comment

Determine which C or C++ compiler is available on your system.

See your system administrator.

Determine the path to your C or C++ compiler.

See your system administrator.

Installing on Maci64

Install X code from installation DVD.