Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

mex.getCompilerConfigurations

Get compiler configuration information for building MEX files

Syntax

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

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

Display Information for C Compiler

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.

Display Number of Supported C Compilers

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

lang — Language'Any' (default) | 'C' | 'C++' | 'CPP' | 'Fortran'

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.

list — Set of configurations'Selected' (default) | 'Installed' | 'Supported'

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

cc — Compiler informationmex.CompilerConfiguration object or array of objects

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.

See Also

Introduced in R2008b

Was this topic helpful?