Supported and Compatible Compilers for R2021b - All Products
A number of MathWorks products or product features require that you have a third-party compiler installed on your system. The tables below outline the compilers that are supported by various MathWorks products. These compilers are provided by a number of vendors and are available under a variety of commercial, academic, or open source terms; visit the providers' websites for further information.
Please seePolyspace documentationfor the list of compilers that Polyspace supports in the current release. SeeSupported Interfaces to Other Languagesfor information about using MATLAB with other programming languages.
MinGW是一个支持金宝appC / c++编译器可用f是哪一个ree of charge.
Note:
- Microsoft Visual C++ 2015 Professional is not supported as of R2021b.
- Support for Intel Parallel Studio XE 2018 for C/C++ and Fortran will be discontinued in an upcoming release.
Windows
MATLAB Product Family
Compiler | MATLAB | MATLAB Coder | GPU Coder |
SimBiology | Fixed-Point Designer | HDL Coder | HDL Verifier | Audio Toolbox | ROS Toolbox |
---|---|---|---|---|---|---|---|---|---|
For MEX-file compilation, loadlibrary, C++ interface, and external usage of MATLAB Engine and MAT-file APIs | For all features | For all features |
For accelerated computation | For accelerated computation | For accelerated testbench simulation | For DPI and TLM component generation | For validating and generating audio plugins | For custom messages and code generation | |
MinGW 6.3 C/C++ (Distributor:mingw-w64) Available at no charge |
|||||||||
Microsoft Visual C++ 2019 product family | |||||||||
Microsoft Visual C++ 2017 product family9 | |||||||||
Intel Parallel Studio XE 2020 for C/C++3 | |||||||||
Intel Parallel Studio XE 2019 for C/C++3 | |||||||||
Intel Parallel Studio XE 2018 for C/C++3 | |||||||||
Intel Parallel Studio XE 2020 for Fortran3 | |||||||||
Intel Parallel Studio XE 2019 for Fortran3 | |||||||||
Intel Parallel Studio XE 2018 for Fortran3 |
Simulink Product Family
Compiler | 金宝app | 金宝app | Stateflow | Simulink Coder | Embedded Coder | SerDes Toolbox |
---|---|---|---|---|---|---|
For S-Function compilation | For Model Referencing, Accelerator mode, Rapid Accelerator mode, and MATLAB Function blocks | For all features | For all features | When targeting the host OS | For IBIS-AMI model generation | |
MinGW 6.3C/C++ (Distributor:mingw-w64)Available at no charge | ||||||
Microsoft Visual C++ 2019 product family | ||||||
Microsoft Visual C++ 2017 product family9 | ||||||
Intel Parallel Studio XE 2020 for C/C++3 | ||||||
Intel Parallel Studio XE 2019 for C/C++3 | 8 | |||||
Intel Parallel Studio XE 2018 for C/C++3 | 8 | |||||
Intel Parallel Studio XE 2020 for Fortran3 | 6 | |||||
Intel Parallel Studio XE 2019 for Fortran3 | 6 | |||||
Intel Parallel Studio XE 2018 for Fortran3 | 6 |
MATLAB Compiler
Compiler | MATLAB Compiler | MATLAB Compiler SDK | |||
---|---|---|---|---|---|
Excel add-in for desktop | C/C++ | COM | .NET | Excel add-in for MPS | |
MinGW 6.3C/C++ (Distributor:mingw-w64) Available at no charge |
2 |
2 |
|||
Microsoft Visual C++ 2019 product family | |||||
Microsoft Visual C++ 2017 product family9 | |||||
Microsoft .NET Framework SDK 4.0, 4.5, 4.6 Available at no charge |
4,5 | 7 |
The following products include lcc-win64 when installed: Simulink, MATLAB Coder, SimBiology, Fixed-Point Designer, HDL Coder, HDL Verifier, Stateflow, Simulink Coder, and Embedded Coder. This compiler is no longer supported and will be removed in a future release of MATLAB and Simulink. MathWorks recommends you install one of the other compilers listed on this page when using these products.
Windows平台的笔记
- The corresponding version of Visual Studio Community is reported to work. Full support for Visual Studio Community has not been qualified by MathWorks.
- Microsoft Windows SDK 10 is required to use MinGW with this product. SeeAnswer 355476for more details.
- Intel compilers require that Microsoft Visual Studio 2017, or 2019 also be installed on your system.
- To build .NET components, a Microsoft .NET Framework must be installed. The .NET Framework v3.0 does not contain a framework-specific compiler; compatible components can be built using the v2.0 compiler. The .NET Framework is automatically installed by Visual Studio. It can also be downloaded from the Microsoft Web site. To execute applications that use the resulting .NET components, the target machine must have the matching .NET Framework installed.
- MATLAB Compiler SDK supports building .NET assemblies but not COM objects when using the Microsoft .NET Framework SDK without Microsoft Visual Studio.
- Fortran compilers are supported with Simulink only for creating Simulink S-Functions using the MATLAB MEX command. The S-Functions can be used with normal and accelerated simulations.
- When building Excel add-ins for MATLAB Production Server, MATLAB Compiler SDK requires .NET framework 4.0 or later.
- MATLAB Function Blocks are not supported with Intel Parallel Studio.
- Visual Studio 2017 can be downloaded from the Visual Studio documentation.Community, Professional, and Enterprise editions are supported. The Visual Studio installer groups functionality into workloads; the "Desktop development with C++" workload is required for MEX and associated functionality.
Note:
- Intel Parallel Studio XE 2017 is not supported as of R2021b
- Support for Xcode 11 will be discontinued in an upcoming release
On macOS, no C compiler is supplied with MATLAB. If you use products that require one, Apple's development environment for macOS (Xcode) isavailable in the Mac App Store.
MATLAB Product Family
Compiler | MATLAB | MATLAB Compiler SDK | MATLAB Coder | SimBiology | Fixed-Point Designer | Audio Toolbox | ROS Toolbox |
---|---|---|---|---|---|---|---|
For MEX-file compilation,loadlibrary , and external usage of MATLAB Engine and MAT-file APIs |
C/C++ | For all features | For accelerated computation | For accelerated computation | For validating and generating audio plugins | For custom messages and code generation | |
Xcode 12.xAvailable at no charge |
|||||||
Intel Parallel Studio XE 2020 for Fortran |
|||||||
Intel Parallel Studio XE 2019 for Fortran |
|||||||
Intel Parallel Studio XE 2018 for Fortran |
|||||||
Intel Parallel Studio XE 2017 for Fortran |
Simulink Product Family
Compiler | 金宝app | 金宝app | Stateflow | Simulink Coder | Embedded Coder |
---|---|---|---|---|---|
For S-Function compilation | 对模型referencing, Accelerator mode, Rapid Accelerator mode, and MATLAB Function blocks | For all features | For all features | When targeting the host OS | |
Xcode 12.xAvailable at no charge |
|||||
Intel Parallel Studio XE 2020 for Fortran | |||||
Intel Parallel Studio XE 2019 for Fortran |
1 |
||||
Intel Parallel Studio XE 2018 for Fortran |
1 | ||||
Intel Parallel Studio XE 2017 for Fortran | 1 |
To determine the version of Xcode installed, start Xcode and then select Xcode->About Xcode.
Notes for the Mac Platform
Linux (64-bit)
On Linux, no C compiler is supplied with MATLAB. The GNU compiler (GCC) is included with many Linux distributions.
MATLAB Product Family
Compiler | MATLAB | MATLAB Compiler SDK | MATLAB Coder | GPU Coder |
SimBiology | Fixed-Point Designer | HDL Coder | HDL Verifier | ROS Toolbox |
---|---|---|---|---|---|---|---|---|---|
For MEX-file compilation,loadlibrary , and external usage of MATLAB Engine and MAT-file APIs |
C/C++ | For all features | For all features |
For accelerated computation | For accelerated computation | For accelerated testbench simulation | For DPI and TLM component generation | For custom messages and code generation | |
GCC C/C++ 9.x |
|||||||||
|
|||||||||
GCC C/C++ 7.x |
|||||||||
|
Simulink Product Family
Compiler | 金宝app | 金宝app | Stateflow | Simulink Coder | Embedded Coder | SerDes Toolbox |
---|---|---|---|---|---|---|
For S-Function compilation | 对模型referencing, Accelerator mode, Rapid Accelerator mode, and MATLAB Function blocks | For all features | For all features | When targeting the host OS | For IBIS-AMI model generation | |
GCC C/C++ 9.x Available at no charge |
||||||
GCC C/C++ 8.x Available at no charge |
||||||
GCC C/C++ 7.x Available at no charge |
||||||
GNU gfortran 8.x Available at no charge |
1 |
To determine the version of your compiler, seeAnswer 99897.