MATLAB Support for MinGW-w64 C/C++ Compiler

Install the MinGW-w64 C/C++ compiler for Windows

801.6K Downloads

Updated 15 Mar 2023

Editor's Note: Popular File 2016 2017 2018 2019 2020

This support package is currently unable to download third-party software for MATLAB R2017a and earlier versions. To install MinGW, complete the workaround instructions in the Bug Report, then return to this page and follow the instructions for R2017b and later.

MATLAB R2017b and later versions are unaffected.

MinGW-w64 is a compiler suite for Windows based on the GNU tool chain. It includes a GCC compiler and related tools for compiling C and C++ applications for Windows. C and C++ applications compiled with MinGW-w64 GCC can be called from MATLAB using MEX. This GCC compiler can also be helpful for other MathWorks products that require a C or C++ compiler.
Instructions for R2023a:
MinGW 6.3: Select the Download button, above, then double click on the file or drag it into the MATLAB Command Window to install.
MinGW 8.1: Only supported for MATLAB and must be configured manually. MinGW 8.1 can be downloaded from here. Follow instructions on this page to configure MinGW 8.1 as MEX compiler.
Instructions for R2017b and later:
Select the Download button, above, then double click on the file or drag it into the MATLAB Command Window to install.
Instructions for R2015b, R2016a, R2016b, and R2017a:
Complete the workaround instructions in the Bug Report, then follow the instructions, below, for R2017b and later.
FAQ: This link provides answers to some frequently asked questions.
This Add-On installs one of the following versions of MinGW GCC based on your version of MATLAB:
MATLAB version__________MinGW version__For more information
R2015b through R2017a____GCC 4.9.2_____http://tdm-gcc.tdragon.net
R2017b and R2018a_______GCC 5.3______ http://mingw-w64.org
R2018b and later__________GCC 6.3______http://mingw-w64.org
See additional information on installing this compiler at:
http://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html
Learn more about other compilers supported by MathWorks Products at:
https://www.mathworks.com/support/requirements/supported-compilers.html
If you are having difficulty installing, please contact Technical Support or see MATLAB Answers:
https://www.mathworks.com/support/contact_us.html
https://www.mathworks.com/matlabcentral/answers/?term=mingw
MATLAB Release Compatibility
Created with R2015b
Compatible with R2015b to R2023a
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: YOKOGAWA GM10 communication interface

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!