Main Content

mex.getCompilerConfigurations

Get compiler configuration information for building MEX files

Description

example

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.

example

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

Examples

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');
length(cLanguageCC)
ans =
    10

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

Input Arguments

collapse all

Language, specified as one of these values.

'Any'

Default value. All supported languages.

'C'

All C compiler configurations, including C++ configurations.

'C++' or 'CPP'

All C++ compiler configurations.

'Fortran'

All Fortran compiler configurations.

Set of configurations, specified as one of these values.

'Selected'

The default compiler for each language.

'Installed'

All supported compilers mex finds installed on your system.

'Supported'

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.

PropertyPurpose
NameCompiler name.
ShortName

Text used to identify options file for the compiler.

ManufacturerName of the manufacturer of the compiler.
LanguageCompiler language.
Version

(Windows® platforms only) Version of the compiler.

Location

(Windows platforms only) Folder where compiler is installed.

Details

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

LinkerNameLinker name.
LinkerVersion

(Windows platforms only) Version of the linker.

MexOpt

Name and full path to options file.

Priority

The priority of this compiler.

Tips

  • If you reinstall a compiler, then run mex -setup to update the compiler configuration information.

Version History

Introduced in R2008b

See Also