This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Get compiler configuration information for building MEX files


cc = mex.getCompilerConfigurations
cc = mex.getCompilerConfigurations(lang)
cc = mex.getCompilerConfigurations(lang,list)



cc = mex.getCompilerConfigurations returns an object cc containing information about the default compiler configurations used by the mex command. There is one configuration for each supported language.

cc = mex.getCompilerConfigurations(lang) returns an array of objects for the given language, lang.


cc = mex.getCompilerConfigurations(lang,list) returns information about the set of configurations, list.


collapse all

myCCompiler = mex.getCompilerConfigurations('C','Selected')
myCCompiler = 

  CompilerConfiguration with properties:

             Name: 'Microsoft Visual C++ 2010 (C)'
     Manufacturer: 'Microsoft'
         Language: 'C'
          Version: '10.0'
         Location: 'c:\Program Files (x86)\Microsoft Visual Studio 10.0'
        ShortName: 'MSVC100'
         Priority: 'A'
          Details: [1x1 mex.CompilerConfigurationDetails]
       LinkerName: 'link'
    LinkerVersion: ''
           MexOpt: 'C:\Users\auser\AppData\Roaming\MathWorks\MATLAB\R2014a\mex_C_win64.xml'

MATLAB® displays information depending on your architecture and your version of MATLAB.

cLanguageCC = mex.getCompilerConfigurations('C','Supported');
ans =

The number of compilers for your version of MATLAB might be different.

Input Arguments

collapse all

Language, specified as one of these values.


Default value. All supported languages.


All C compiler configurations, including C++ configurations.

'C++' or 'CPP'

All C++ compiler configurations.


All Fortran compiler configurations.

Set of configurations, specified as one of these values.


The default compiler for each language.


All supported compilers mex finds installed on your system.


All compilers supported in the current release.

Output Arguments

collapse all

Compiler information, specified as a mex.CompilerConfiguration object or array of mex.CompilerConfiguration objects. The mex.CompilerConfiguration class contains the following read-only properties.

NameCompiler name.

Text used to identify options file for the compiler.

ManufacturerName of the manufacturer of the compiler.
LanguageCompiler language.

(Windows® platforms only) Version of the compiler.


(Windows platforms only) Folder where compiler is installed.


More read-only properties about the compiler configuration. These properties depend on the compiler, platform, and release of MATLAB.

LinkerNameLinker name.

(Windows platforms only) Version of the linker.


Name and full path to options file.


The priority of this compiler.

See Also

Introduced in R2008b