File Exchange

image thumbnail

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

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

7704 Downloads

Updated 12 Sep 2018

Editor's Note: Popular File 2016 2017

This support package is currently unable to download third-party software for MATLAB R2017a and earlier versions. For details and workaround, see this Bug Report.

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.
This Add-On installs one of the following versions of MinGW GCC based on your version of MATLAB:

MATLAB R2015b, R2016a, R2016b, R2017a: MinGW GCC 4.9.2 from TDM
MATLAB R2017b and beyond: MinGW GCC 5.3 from mingw-w64.org

Learn more about this compiler and related tools at:
http://tdm-gcc.tdragon.net
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:
http://www.mathworks.com/support/compilers

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

Comments and Ratings (390)

Sinwoo Jeong

Pritam Sarkar

lidiya john

Paul Maurer

Allows compilation of mex files under windows.

jianxiong qi

我直接在c、c++模板里编写文件然后生成mex文件,出现的都是无法解析外部命令啊,file.mexw64 fatal error LINK1120,要怎么处理啊,前辈,师傅们,求教啊,小弟感激不尽

<b>Thank you!</b>

Kane Yang

MATLAB R2018a.After i downloaded it, when i double clipped on the "install_supportsoftware.exe",then occuered the window saying "error occurred while starting matlab".

Greg

Greg (view profile)

MathWorks' solution for C compilers in the newer versions is pretty much garbage when operating from a secure corporate IT environment. The add-on installer doesn't work at all because it gets hung up on the corporate firewall, and I can't access the basic download files for MinGW from the links you provide because they all wind up at Sourceforge, which is blocked by corporate web filters because it's a freeware site.

Seems like the least you could do for all we pay for MATLAB licenses is host the executables on your own site...

Rodney Itiki

Yu Zhao

Ke Zhang

Okan Ersoy

leo ye

leo ye (view profile)

shutdown your firewall then open this page

Kym Gois

Thank you Saeed Tahvili and Hasan Sari. I did what you said and it worked on R2016a windows 10

jiujiu0909

安装出错

I am facing problem in downloading setup file, I have R2018a. Below error message I am getting. Can someone help me with this.
Error meesage: This support package is currently unable to download third-party software for MATLAB R2017a and earlier versions. For details and workaround, see this Bug Report.

Gracias

For the guys who encounter 'Received fatal error: protocol version' error, there is a method to fix this problem. Just follow the instructions mentioned in the below link, and your problem will be solved. I too was facing the same error, but it was solved easily.

Link: https://de.mathworks.com/matlabcentral/answers/385789-why-do-i-encounter-a-received-fatal-alert-protocol_version-when-installing-a-support-package-in-ma

timo

timo (view profile)

For people interested, i have built Boost boost_1_67_0 with this MinGW compiler. The shared zip it is at location :https://drive.google.com/file/d/1BhIK0a8S8W496KZ3rvcRjhxc_rb7MVwF/view?usp=sharing

ED GH

ED GH (view profile)

I have problem installing on R2018a. It does not work.

I got the following error, no success to apply the provided suggestions.

"Download Error
Failed to download the third-party software:
MinGW 5.3.0 from MinGW-w64.org
This is required by:
MATLAB Support for MinGW-w64 C/C++ Compiler
To resolve this issue, see this MATLAB Answer."

Thanks Pawan Singh, it worked. However, I am getting following warning with my Matlab 2017b:
Is there an updated version of MinGW in this link?

Thanks

" Warning: You are using an unsupported version of MinGW Compiler. To install the supported version of MinGW compiler, see: Install MinGW-w64 Compiler.
For a list of currently supported compilers visit http://www.mathworks.com/support/compilers. "

Yidao Hu

qingqing825

Why I can not download it!!!

@mohammed alnakhli: You can verify the supported compiler options on this documentation page: https://www.mathworks.com/support/compilers.html The free compiler option for Mac is XCode. MinGW is related to Windows only.

is it needed it for Mac or only windows?

@JonasDalke: It appears you are using R2016b MATLAB. Have you applied the patch this bug report? https://www.mathworks.com/support/bugreports/1741173 You should install this patch first and then try reinstalling the Add-On. If that still doesn't work, please contact Technical Support.

Jure

Jure (view profile)

The workaround described in the bug report didn't work, but hasan sari's solution did. Thanks!
Win7, x64, R2016b

@Ammar Ali: MinGW doesn't currently support Fortran. See link above.

@FabianJ: This issue seems more related to general MATLAB and not compiler installation. Please contact Technical Support and they can help you.

FabianJ

Test with 2018a:
Compilation of libsvm succeeded, but function call of 'svmpredict' leads to complete crash of Matlab. Same procedure works for 2017b.

Ammar Ali

Ammar Ali

This does not seem to be working for my FORTRAN code. No compiler has been recognised and I cannot even do the "timestwo.F" example. Works fine for C and C++

@L'Yvonnet This could be related to a few issues when compiling an Excel Add-In including MATLAB version, compiler version, etc. We recommend you contact Technical Support directly as they will be able to better assist you with this issue.

hlk

hlk (view profile)

Hi, I performed the exact same procedure as described by pawan, but still gets a "No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler" when trying to compile an excel add in ... any ideas ?
Thanks

Thank you pawan! It worked for me too!
After the installation just type
setenv('MW_MINGW64_LOC', 'C: \ TDM-GCC-64')
and the second one is
mex -setup
and it works!

Ferdin Joe

Thank you pawan! Your procedure works!

John Wincn

pawan's process works, on x64 Win7 setup

pawan singh

Hi everyone,
I have successfully installed the mingw 5.0 with respect to the given matlab recommendations.
1)https://sourceforge.net/projects/tdm-gcc/
Just download and install to the "C:\TDM-GCC-64" folder
2) In matlab call the setenv('MW_MINGW64_LOC','C:\TDM-GCC-64')
3) In matlab call the mex -setup

Titas Bucelis

"Download Error: There was a problem downloading the third-party software. To resolve this issue, contact Technical Support"

Thank you so much the problem of this message "Download Error: There was a problem downloading the third-party software. To resolve this issue, contact Technical Support" is solved with me by using the Bug Report. My Matlab version is R2016b

George Liu

Huaiyi Wang

As is complained by others, "Undefined variable "mex_spkg" or class "mex_spkg.getEnvVarName"."

I have managed to build and run a mixed C/FORTRAN mex project with this add-on (using R2018a). The mex-gateway is written in C, but when I try to build a FORTRAN-only project, like the supplied trivial timestwo.F, it does not work. It has been stated in the comments below (18 July 2017) that gnu fortran is supported, but it seems it isn't.

Will there be support for FORTRAN-only mex-files using the gfortran compiler in the MinGW-w64 Add-On?

Pan Merak

sorry, unimplemented: 64-bit mode not compiled in

WTF!?

@Wassili Per your message, have you tried the steps in the Bug Report link shown above in the Edtior's Note? If that doesn't work for you, please contact Technical Support.

There seems to be some issue with the install package mlpginstall an two-step authentication.
Only when I turned off two step authentication, the 2017b install with mingw5.3 progerssed and worked as expected:
BR Jonas

Thank you very much @hasan sari, your instructions worked perfectly.
hasan sari
26 Apr 2017
Hi everyone,
I have successfully installed the mingw 4.9.2 with respect to the given matlab recommendations.
1) https://freefr.dl.sourceforge.net/project/tdm-gcc/TDM-GCC%20Installer/Previous/1.1309.0/tdm64-gcc-4.9.2.exe
Just download and install to the "C:\TDM-GCC-64" folder
2) https://www.mathworks.com/help/matlab/matlab_external/compiling-c-mex-files-with-mingw.html
3) In matlab call the setenv('MW_MINGW64_LOC','C:\TDM-GCC-64')
4) In matlab call the mex -setup

Is there any way to install this compiler outside MATLAB (not with the Add On) and configure it to Mex command?

Running 2017b not possible to download

Patrick Hew's 26 Mar 2018 response provides a concise walk-through, at least for me. I have MATLAB R2017a on Windows 7.

@sondes belgacem, @Jimmy Bouche: It looks like you have installed the 3rd party LIBSVM library successfully but not the compiler. Please follow the steps here: https://www.mathworks.com/support/bugreports/1741173 and then try the installation of the support package.

@Liza Belova: It looks like you are seeing this error due to Java. Please follow the steps in that same link (https://www.mathworks.com/support/bugreports/1741173) and then try the installation of the support package.

Jimmy Bouche

I have the same probleme of you, sondes belgacem... Someone for help us ? Please

--->
''i have Matlab R2017a and i installe LIBSVM but it affect this erreur
>> mex -setup
Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see
Install MinGW-w64 Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2017a/.
and when i installe this version for MinGW from Add-On the third-party usally affect a probléme of downloading
please help me''

Liza Belova

Does't works on MATLAB R2015b
The following errors occur:
1) Download Failed: Received fatal alert: protocol_version
2) Support Package Installer is in the middle of a download operator. Please wait until the operation is finished or cancel it and try again.

Supplied the required version tdm64-gcc-4.9.2 for Matlab 2015b

Why does't it work?

i have Matlab R2017a and i installe LIBSVM but it affect this erreur
>> mex -setup
Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see
Install MinGW-w64 Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2017a/.
and when i installe this version for MinGW from Add-On the third-party usally affect a probléme of downloading
please help me

Anil Yildiz

Giordano Baldeschi (14 Mar 2018) 's solution works. Otherwise, it does not install. My version is R2016b.

Does not works on MATLAB R2018a.

Ankit Mondal

I followed the instructions given in the Bug Report at the top of this page, and it worked.

timo

timo (view profile)

I try to use
mex -v -L"c:\ProgramData\MATLAB\SupportPackages\R2018a_1\3P.instrset\mingw_w64.instrset\x86_64-w64-mingw32\lib" -liphlpapi MACAddress_mex.c

And i get the error:
Error using mex
MEX cannot find library 'iphlpapi' specified with the -l option.
MEX looks for a file with one of the names:
libiphlpapi.lib
iphlpapi.lib
Please specify the path to this library with the -L option.

I looked for libiphlpapi.a but i found it has the extension .a and not .lib as it searches by default . Any way to fix this ?
Works with Visual Studio 2017 compiler.

Patrick Hew

@Brian Kirby, @Saeed Tahvili, @hasan sari and Mathworks Support: thank you, those instructions worked. R2016a, Windows 10.

1) manually download and unzip MinGW-w64 from MathWorks github page into a new folder C:\TDM-GCC-64
https://github.com/mathworks/MinGW_492/releases
2) follow help from MathWorks support team to manually configure MinGW for Matlab
https://www.mathworks.com/matlabcentral/answers/313298-i-already-have-mingw-on-my-computer-how-do-i-configure-it-to-work-with-matlab

yishu

yishu (view profile)

如果下载不了,把杀毒软件以及系统防火墙都关掉,就可以了,希望能帮到大家。

seriously. codegen says that it needs this to compile with parfor. and, i am simply unable to get the work around to work. I guess i will spend the next three hours installing matlab 2017b or 2018a.

mbenz

mbenz (view profile)

@MathWorks Supported Compilers Team:
No, it does not work on R2018a. I had the same issue in R2017b and I had to download the add-on on a PC that is outside of the network using the ssi_standalone.exe (because of a certificate issue).
Now in R2018a, this method does not work because ssi_standalone.exe does not exist anymore.

You need to fix this issue...

@AnnArborObserver, yes it works for 2018a. Description is correct
MATLAB R2017b and beyond: MinGW GCC 5.3 from mingw-w64.org

Does this add on work for Matlab 2018a? Please update the description.

Manish Thorat

Is gfortran supported?

<SOLVED>
My version is matlab 2016a in Windows10.
I followed the Mathworks instructions, here https://it.mathworks.com/support/bugreports/1741173.

1) download one of the packeage at the end of the page ( for MAC, WIN, LINUX).

2) watch inside the .zip file and find the same files in the MATLAB folders, these file in the Matlab folders must be saved for safety in another folder, after that you have to replace them inside the .zip files.

3) Come back in Matlab program and download MinGW from Add-Ons, next restart Matlab and you have finish.

I hope to be clear and I hope to have helped you.

Dear MathWorks support:

How could we use the software with prior versions to R2017a?

Thanks

Please see editors note: This support package is currently unable to download third-party software for MATLAB R2017a and earlier versions. For details and workaround, see this Bug Report https://www.mathworks.com/support/bugreports/1741173

martccd

Keep having the error Download Error Received fatal alert: protocol_version

Jinshan

Totally a trash. Keep having the error Download Error Received fatal alert: protocol_version

Zhida DENG

Hi everyone,

It has been successfully installed in MATLAB 2017b. In the beginning, I was failed to download the MinGW GCC 5.3 as third-party software for MATLAB R2017b, this was solved when I close the MATLAB. Try it, hope it would help.

KUANGJU DENG

Boris Godoy

chengjun tan

Thank you Saeed Tahvili and Hasan Sari. I did what you said and it worked \o/

Saeed Tahvili

I tried the instruction of "hasan sari" and it worked.
hasan sari
26 Apr 2017
Hi everyone,
I have successfully installed the mingw 4.9.2 with respect to the given matlab recommendations.
1) https://freefr.dl.sourceforge.net/project/tdm-gcc/TDM-GCC%20Installer/Previous/1.1309.0/tdm64-gcc-4.9.2.exe
Just download and install to the "C:\TDM-GCC-64" folder
2) https://www.mathworks.com/help/matlab/matlab_external/compiling-c-mex-files-with-mingw.html
3) In matlab call the setenv('MW_MINGW64_LOC','C:\TDM-GCC-64')
4) In matlab call the mex -setup

Brian Kirby

Hi, I was able to work around the download error that many seem to have had. I have Matlab R2016a.
'Download Error Received fatal alert: protocol_version'

1) manually download and unzip MinGW-w64 from MathWorks github page into a new folder C:\TDM-GCC-64
https://github.com/mathworks/MinGW_492/releases
2) follow help from MathWorks support team to manually configure MinGW for Matlab
https://www.mathworks.com/matlabcentral/answers/313298-i-already-have-mingw-on-my-computer-how-do-i-configure-it-to-work-with-matlab

Alex

Alex (view profile)

We are working on the following download error and will update when it is fixed.
Download Error Received fatal alert: protocol_version

yuji Ito

Fail to download with fatal error. I'm use Matlab R2015b

Nick Yap

winths

winths (view profile)

joachim

Samuel Giatti

I run into problems during downloading/ installing too. I managed to solve it by setting proper proxy settings under Home -> Preference -> Web : "enter your proxy settings"
Problem faced and solved in a company network with a Win 10 machine and Matlab 2017b.

After logging into my MATLAB account, I installed the compiler according to the 'Download button at the top of this page. The installation seems straight forward and appeared to be a successful install as it progressed through the completion bullets and had no errors reported.

To check it, I used the page https://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html
and the MATLAB command window reported :

>> mex yprime.c
Building with 'MinGW64 Compiler (C)'.
MEX completed successfully.

This created a file with FileName yprime and FileExtension MEXW64 . This runs successfully as a function from the command line

>> yprime(1,1:4)

ans =

2.000000000000000 8.968491817397247 4.000000000000000 -1.094723275660229

All seems well. HOWEVER, now when I attempt to create a complied library (using APPS tab and the Library Compiler in the APPLICATION DEPLOYMENT group ) I get a failure with a log file that reports the compiler was not found.

I haven't been able to figure this out. It seems to me I am missing something or, the support team needs to point to a step-by-step procedure (with verifications) to allow the installed compiler to be accessed by the application deployment tool. I have a valid license and valid installation of MATLAB R2017a.

Hung Nguyen

Marco Riani

In my case (windows 10 and MATLAB 2017b) it was necessary to run MATLAB as administrator in order to successfully install MInGW compiler.

Following matlab 2017b warning that I am using an old version of MinGW compiler I download the mingw.mlpkginstall file. The installation process is stopped with a download error:
Failed to download the third-party software:
MinGW 5.3.0 from MinGW-w64.org

This is required by:
MATLAB Support for MinGW-w64 C/C++ Compiler

jack carter

Youssef Jaber

Fails to download every time. This has been an issue for months

song li

Ali Nawaz

timo

timo (view profile)

Worked perfectly

Why so many people give 1 star ? They have hacked Matlab version , full of viruses and malware , of course it wont work properly
I have Home edition . Worked perfectly and tested

Example:

Building with 'MinGW64 Compiler (C)'.
C:\ProgramData\MATLAB\SupportPackages\R2017b\3P.instrset\mingw_w64.instrset\bin\gcc -c -DUSE_MEX_CMD -m64 -DMATLAB_MEX_FILE -I"C:\Program Files\MATLAB\R2017b/extern/include" -I"C:\Program Files\MATLAB\R2017b/simulink/include" -I"C:\Program Files\MATLAB\R2017b/extern\lib\win64\mingw64" -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\Users\timo\Documents\MATLAB\MACAddress_mex.c" -o C:\Users\timo\AppData\Local\Temp\mex_593534422989106_7140\MACAddress_mex.obj
C:\ProgramData\MATLAB\SupportPackages\R2017b\3P.instrset\mingw_w64.instrset\bin\gcc -c -DUSE_MEX_CMD -m64 -DMATLAB_MEX_FILE -I"C:\Program Files\MATLAB\R2017b/extern/include" -I"C:\Program Files\MATLAB\R2017b/simulink/include" -I"C:\Program Files\MATLAB\R2017b/extern\lib\win64\mingw64" -fexceptions -fno-omit-frame-pointer -O -DNDEBUG "C:\Program Files\MATLAB\R2017b\extern\version\c_mexapi_version.c" -o C:\Users\timo\AppData\Local\Temp\mex_593534422989106_7140\c_mexapi_version.obj
C:\ProgramData\MATLAB\SupportPackages\R2017b\3P.instrset\mingw_w64.instrset\bin\gcc -m64 -Wl,--no-undefined -shared -static -s -Wl,"C:\Program Files\MATLAB\R2017b/extern/lib/win64/mingw64/exportsmexfileversion.def" C:\Users\timo\AppData\Local\Temp\mex_593534422989106_7140\MACAddress_mex.obj C:\Users\timo\AppData\Local\Temp\mex_593534422989106_7140\c_mexapi_version.obj -liphlpapi -L"C:\Program Files\MATLAB\R2017b\extern\lib\win64\mingw64" -llibmx -llibmex -llibmat -lm -llibmwlapack -llibmwblas -o MACAddress_mex.mexw64
MEX completed successfully.

Judas Chu

xin tang

pure trash

No problems during installation. Let's see how it works.

Fritz

Fritz (view profile)

Jet Simpson

wen is right.
Go to the following link and click 'download mingw now'. Save the .mlpkginstall file.
https://cn.mathworks.com/support/compilers.html
Then run it.

Jeonggyu Bak

Andreas J.

Vaidas Ma

.

adi

adi (view profile)

How to install it? I still got the problem as below.

No supported SDK or compiler was found on this computer.
For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2013a/win64.html

andres moreno

before finishing the installation, I get this warning "MinGw compiler not setup for use with MEX setx does not recognize as an internal or external command" and matlab tells me that "No supported compiler or SDK was found." How is the correct way to install it then? I have windows8.1 of 64bits and matlab R2017b, please help me!

Chen Qian

use the sentence in the command window
>> uiopen( '....', 1)
'...' is the path of your mingw.mlpkginstall file

[learned from the Internet]
Good luck!

Sean Bai

不要点击“安装”,应该点击“仅下载”,然后你很快会看到一个名字叫“install_supportsoftware.exe”的下载的文件,用鼠标双击它,几分钟后就会安装完成。
我在这个问题上花费了一整天!太差劲了!不过幸运的是我最后把它解决了,太棒了!
Now,it worked perfectly!

Cannot Install. Please help.

Received error said: Error using open (line 162) Only three part message catalog IDs are suppported by hwconnectinstaller.intermal/getAdjustedMessageID

can not install

Wen

Wen (view profile)

Installation Steps (English):
1.Execute matlab and change the path to the folder which contains mingw.mlpkginstall;
2.Double click the mingw.mlpkginstall in the current folder. Then follow the instructinons and the compiler will be installed.

安装步骤 (Chinese):
1.打开matlab软件,把路径调整到已下载的mingw.mlpkginstall文件所在目录
2.在当前文件夹窗口里双击mlpkginstall,按后按照安装提示操作,即可装好。

Francis

Hi, I want to ask how to install it ?

Safer Mourad

Uma,
it worked fine in my case with Windows 10. I've used Matlab's Add-On Explorer for installation and invoked the matlab command "mex -setup" afterwards...
Good Luck

uma mahessh

I installed the MinGW-w64 C/C++ Compiler on matlab 2017a working on Windows 10.But still i am facing problem "No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install
MinGW-w64 Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2017a/." when in I am running mex files.
Required help.

Somehow downloading and installing it in Matlab 2017b didn't work for me, but it did in Matlab 2016b and is now also available in Matlab 2017b.

YAWAR REHMAN

Downloaded mingw.mlpkginstall file.
Ran it but it keeps on installing for hours and hours, without completion! (internet connection is fine)
Can someone please suggest what to do?

Gang XU

can not install

Xiao Fu

too bad
连接错误
应用程序无法连接到 MathWorks。有关解决此问题的详细信息,请参阅此 支持文章。
为什么不直接放出安装程序

yuyang gao

shiyong zhang

Qiang Gu

while trying to install?download MinGW for Matlab R2017a i am facing trouble ie; support package is succesfully downloaded but third party software fails to download everytime.please give me a solution.Do i need a licensed version of matlab or not?
because i have a ccracked version of matlab R2017a???

Andreas J.

mlxs

mlxs (view profile)

Marta

Marta (view profile)

I tried to install on R2017a, At the end of the installation, there is compiler setup failed message: MinGW compiler directory not found. Unable to setup the MinGW compiler with MEX.
Please advise. Thank you.

Wei-Jie Chen

errors about install this addone package:

can not download:
MinGW 5.3.0 from MinGW-w64.org

2017b. how can I deal with this problem.
Any one know? thanks!

Wei-Jie Chen

qilin guo

有网络连接的情况下,我在在试图安装 MinGW-w64 是总是收到这个错误提示:下载支持包时出现问题。要解决此问题,请参阅该 MATLAB 答复,但是参考链接没有给出合适的解决方法。我确信我的网络链接没有问题。我猜测是 MinGW-w64 的网站可能出现了问题。希望尽快解决。

Su Lim Kok

It kept Download failed, read time out, no matter how much i watch it, still failed....
i tried 6 times... MATLAB 2015b

HD wang

No bueno for 2017a and 2017b :(

babita verma

it does not installs!!

It does not work. I keep getting the "No supported compiler or SDK was found." message.

I am trying to install it but it failed showing following error, "PKIX path building failed , Unable to find valid certification path for requested target" I am using windows 10 and matlab 2016a.

Joris Mens

Bernt Nilsson

18 Jul 2017 (see below) it was reported that GNU FORTRAN is supported using this package. I have installed the package and C-files compile fine, but how do I compile FORTRAN files?

I installed it and for starters it succesfully compiled my c function. No problems so far.

Georg

Georg (view profile)

Does not work for me. I download and install and I still get same error when i want to configure.
mbuild -setup
Error using mbuild (line 164)
Unable to complete successfully.
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install MinGW-w64 Compiler. For more options, visit
http://www.mathworks.com/support/compilers/R2017a/.

Does not work. Toolbox installation always reported an error. Matlab does not even correctly detect compatible MinGW installations by itself, it simply tries looking for an environment variable and then gives up. Could at least give the option to search a directory for a viable MinGW installation as Jetbrains does with their IDEs.

Thanks a alot, working without anu issue

It worked perfectly

sorry but I think "download issues" for Matlab2015b have not been resolved, unfortunately!

Intallation keeps failing; no information given why..

Fell over at creating a directory the first run, but appeared to be smart enough to understand it had done all the downloading for the second run that it didn't waste time re-downloading. The second run was successful.

Angelina

I'm trying to install MATLAB Support for MinGW-w64 C/C++ Compiler on my PC and I can not open it on Matlab 2015b.
Can anyone help me to show me the procedure for installation, because I am a beginner and I do not really know Matlab

Thank you for your help

Angelina

@hasan sari - Thanks. That worked for me (on 2017a under W10).

guaiman

how to use it?

found it :) thanks

I want to uninstall MinGw, how can i do that?

SANG JIN JANG

Maxime

Maxime (view profile)

MinGW-w64 a C/C++ compiler from TDM-GCC is not available for this release of MATLAB
I have MATLAB R2014b
...

cc

cc (view profile)

It does not work for me. I am running MATLAB 2017a on a pc with 64bit-windows 10. When I try to compile the c files. It output the following error:

C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x2d9):
undefined reference to `__imp_WSAGetLastError'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x14ca):
undefined reference to `__imp_inet_addr'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x14da):
undefined reference to `__imp_gethostbyname'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1530):
undefined reference to `__imp_htons'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x15f9):
undefined reference to `__imp_sendto'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1677):
undefined reference to `__imp_send'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x168d):
undefined reference to `__imp_WSAGetLastError'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x182f):
undefined reference to `__imp_closesocket'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1928):
undefined reference to `__imp_WSACleanup'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1a06):
undefined reference to `__imp_recvfrom'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1a0d):
undefined reference to `__imp_recv'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1b25):
undefined reference to `__imp_ntohs'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1b2e):
undefined reference to `__imp_htons'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1b75):
undefined reference to `__imp_WSAGetLastError'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1d6d):
undefined reference to `__imp_socket'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1dd9):
undefined reference to `__imp_connect'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1e26):
undefined reference to `__imp_ioctlsocket'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1e68):
undefined reference to `__imp_socket'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1e82):
undefined reference to `__imp_socket'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1e9c):
undefined reference to `__imp_htons'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1ed6):
undefined reference to `__imp_setsockopt'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1ee8):
undefined reference to `__imp_bind'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1ef8):
undefined reference to `__imp_closesocket'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1f08):
undefined reference to `__imp_listen'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1f21):
undefined reference to `__imp_ioctlsocket'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x1f98):
undefined reference to `__imp_accept'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x2005):
undefined reference to `__imp_ioctlsocket'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x2027):
undefined reference to `__imp_setsockopt'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x20f5):
undefined reference to `__imp_connect'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x2196):
undefined reference to `__imp_ioctlsocket'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x21f8):
undefined reference to `__imp_WSAStartup'
C:\Users\cc\AppData\Local\Temp\mex_383860117070150_5908\pnet.obj:pnet.c:(.text+0x2c87):
undefined reference to `__imp_ntohs'
collect2.exe: error: ld returned 1 exit status

Ji Tan

Ji Tan (view profile)

followed the steps to install to C:\TDM-GCC-64, still not working....

Louiva

Louiva (view profile)

Bernt Nilsson

I should have been more specific, I meant GNU FORTRAN of TDM MinGW package for 64-bit Windows. Do you mean this is supported? This is not clear to me from the Supported Compilers page, where it says only C/C++ for MinGW.

@Fake: The MinGW support package has been recently updated in MATLAB to resolve previous download issues. Please try reinstalling MinGW through the support package in MATLAB. If you are having continued issues installing through the support package, please contact MathWorks Technical Support.

@Bernt: GNU Fortran is currently supported in MATLAB (v4.9 for R2017a): https://www.mathworks.com/support/compilers.html

Fake McFaker

Hello,
I installed mingw w64 in Matlab r2015b. The path that mingw is saved is C:\TDM-GCC-64. After the installation I opened Matlab and i used this command setenv('MW_MINGW64_LOC','C:\TDM-GCC-64') and after this i pressed -mex filename.c- and i had this error
"Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see
Install MinGW-w64 Compiler. For more options, see http://www.mathworks.com/support/compilers/R2015b/win64.html."
I can't figure out why this is happening. My professor does exactly the same things and his matlab works fine when he uses the compiler. Please help me! Thank you!

Bernt Nilsson

Are there any news about support for GNU FORTRAN?

Tuong Nguyen

I figured out you can just change the lib name to end '.lib' instead of '.a'. This shouldn't work since a .a file is a different structure from a .lib file, but apparently mingw-w64 is smart enough to notice the file format.

@Richard: I looked at your MATLAB Answers page and I can't discern from that warning message which LIB function it refers to, the .a or the .lib file. Please check the -l and -L usage, along with the filenames command and the complete path formatting, here: https://www.mathworks.com/help/matlab/ref/mex.html#inputarg_filenames If you are still stuck with this usage, please contact Technical Support.

I have the same issue as Xi Cai below. I want to link to a .a file, also produced by Mingw-w64, but mex only passes .lib file names to gcc. I attempted to link to a .a file by using the full path, as suggested by the compilers team, but this results in an error:

"$$LIB not found; check that you are in the correct current folder, and check the spelling of '$$LIB'.

See my MATLAB Answers question here: https://uk.mathworks.com/matlabcentral/answers/347345-lining-to-static-library-using-mingw-w64. I'm using R2016b. Is there any solution, or am I doing something wrong in my command?

Joshua Forer

Also getting the 'INSTR_SET_DATA_DISPLAY_NAME' error; using R2016a

charles

When I try to install this I get the following error:

There was an error installing third-party software for Support Package mingw:
C:\MATLAB\SupportPackages\R2016a\downloads\mingw_download
does not contain archives for third-party software used by the support package.

I followed the instructions in the bug report that John posted (https://www.mathworks.com/support/bugreports/1507667), unfortunatly it didn't work. This is probably due to the fact that I use R2016A and not R2016B. Does anybody know a way to install this add-on in another way?

Can you guys do something that work for once.

Hey i work with Matlab R2016a and had also the problems with the error: There was a problem installing the third-party software. To resolve this issue, contact Technical Support. I tried to solve the problem the way wich is showen if you follow the Link from John, 21 Jun 2017.
Now i have the error: 'INSTR_SET_DATA_DISPLAY_NAME'.
Did one of you haven a idea to fix that error?

Li Wang

For people working with Matlab 2017a, please see the fixing method of @hasan sari below.

John

John (view profile)

John

John (view profile)

I experienced the error pointed out before (i.e. `There was a problem installing the third-party software. To resolve this issue, contact Technical Support`). I`m using R2016b. I followed the recommendation from the link below as suggested by MathWorks Supported Compilers Team and it works now! Thank you. https://www.mathworks.com/support/bugreports/1507667

wang zhen

really sucks

Thuong Nguyen

I stumbled on this error while trying to install the compiler: INSTR_SET_DATA_DISPLAY_NAME. Please could anyone give advice on the solution to this problem?

Mandeguz

I am using Matlab 2017a, and I have the following error:

Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install MinGW-w64
Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2017a/.

But I've installed the MinGW-w64 C/C++ Compiler from TDM-GCC successfully, and now I've installed this, but nothing seems to work. Any ideas? Thanks

Wolfgang

It dosen't work with NI's http://www.ni.com/example/30957/en/
32bit program.

Matlab sucks

Nikhil Kale

@Hasan sari, works for 2017, thanks

@Xi
The name of the library you are looking for is “libiphlpapi.a” and it is located in the directory “$mingwroot\ x86_64-w64-mingw32\lib” for MinGW 4.9.2, where $mingwroot is your installation directory of the compiler. Since this library has a ".a" extension, it is a static library and you would need to provide the full path to the library in your MEX command. This would look something like:
mex <filename>.(c/cpp) $mingwroot\ x86_64-w64-mingw32\lib\ libiphlpapi.a.

Hope this helps

Xi Cai

Xi Cai (view profile)

I am using Matlab 2017a, and I have installed the MinGW successfully. But I have an error as below:
"MEX cannot find library 'Iphlpapi' specified with the -l option.
MEX looks for a file with one of the names:
libIphlpapi.lib
Iphlpapi.lib
Please specify the path to this library with the -L option."

Doesn't MinGW have the iphlpapi.lib? Any idea to solve this problem? Thanks a lot.

Jack Foster

Andrew

Andrew (view profile)

@Andrew
I have discovered that MinGW is not compatible with MATLAB R2015a.

Instead I was able to use SDK 7.1 on windows 10.

To help others do this, If you install SDK 7.1 from this link:

http://www.microsoft.com/en-us/download/details.aspx?id=8279

and still have problems, such as typing into MATLAB

mex -setup

and then receiving the error:

No supported SDK or compiler was found on this computer.
For a list of supported compilers, see
<http://www.mathworks.com/support/compilers/R2012a/win64.html>

This means that you need to follow the instructions on this page:

https://www.mathworks.com/matlabcentral/answers/95039-why-does-the-sdk-7-1-installation-fail-with-an-installation-failed-message-on-my-windows-system

This worked for me with Windows 10 MATLAB 2015a.

Fresh

Fresh (view profile)

same problem like Nassim Hassaim when i run "make" it turns out
Error: D:\Program Files\MATLAB\R2016a\toolbox\libsvm-3.22\matlab\make.m failed (line 13)
gcc: error: \-fexceptions: No such file or directory

need help :(

Andrew

Andrew (view profile)

I am using
MATLAB R2015a (8.5.0.197613)
64-bit (win46)
Windows 10

I have completed steps 1) to 3) in hasan sari's post, however step 4 gives me the error in the command window:

Error using mex
No supported compiler or SDK was found. For options, visit
http://www.mathworks.com/support/compilers/R2015a/win64.html.

Thank you.

congxiaochao

Error, Archive is not a zip file.

@hasan hari Thank you ! This worked flawlessly on 2017a.

Steve Barnes

@hasan hari Thank you ! It worked for me aswell :)

Gustavo Jesus

@hasan sari - Thank you very much! Your steps, following exactly (including dl and installing from sourceforge) worked flawlessly for 2016b.

Gustavo Jesus

Ola Olsson

@hasan sari - Thanks. That worked for me (on 2017a).

hasan sari

Hi everyone,

I have successfully installled the mingw 4.9.2 with respect to the given matlab recommendations.

1)https://freefr.dl.sourceforge.net/project/tdm-gcc/TDM-GCC%20Installer/Previous/1.1309.0/tdm64-gcc-4.9.2.exe

Just download and install to the "C:\TDM-GCC-64" folder

2)https://www.mathworks.com/help/matlab/matlab_external/compiling-c-mex-files-with-mingw.html

3) In matlab call the setenv('MW_MINGW64_LOC','C:\TDM-GCC-64')

4) In matlab call the mex -setup

Taotao Zhou

@Antonio - There is a patch that is specifically for these R2016b issues found in this bug report: https://www.mathworks.com/support/bugreports/1507667 . Please install the patch found there and if you are still having problems, please don't hesitate to contact technical support.

I am experiencing similar issue to Jiong Zhang and Lukas Mannhart.
On Matlab R2016b, the MinGW-w64 packages appear to be successfully installed using the Add-Ons site.
Nevertheless, I still get the following error:
------
Error using loadlibrary
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler;
see Install MinGW-w64 Compiler. For more options, visit
http://www.mathworks.com/support/compilers/win64/R2016b.html.

Error in loadlibrary
------

I have tried reinstalling seting UAC to "never notify", but the error persisted.

Is there anything else I could try? Thank you in advance.

@Lukas - This is probably related to UAC configuration on Windows 7. Please try temporarily lowering your UAC settings on Windows 7 via the Control Panel, and then reinstalling the Add-On.

Hi
I have also installed this MinGW-w64 C/C++ compiler with the Addon Browser. The installation appears to be done, but when I type "mex -setup" i get the same error as Jiong does.
------------------
>> mex -setup
Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see
Install MinGW-w64 Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2017a/.
------------------
so went on and checked the Environment Variable. The path in there was: C:\ProgramData\MATLAB\SupportPackages\R2017a\MW_MinGW_4_9
When I checked the folder, I saw, that the folder is completely empty (0 Bytes)
I don't know how to proceed. Do you maybe have a solution for this problem?

@Jiong – This is likely an issue with your UAC configuration on Windows 7. We have made a change that should resolve this. Please try reinstalling the Add-On. If this doesn’t resolve your issue, please share more details on MATLAB Answers or contact Technical Support.

@Logan – Your issue may be related to the following: https://www.mathworks.com/support/bugreports/1507667
If not, we encourage you to post more details about your problem on Answers or contact Technical Support.

@Shin – We suggest you following the steps in this Answers post: http://www.mathworks.com/matlabcentral/answers/313286-why-do-i-see-a-java-util-zip-zipexception-error-in-my-installer-log-file-when-i-try-to-install-the

Jiong Zhang

Jiong Zhang

I have successfully installed the MinGW-w64 packages by clicking the install button in Matlab R2017a in Windows 7 system. But when I input "mex -setup" in the Matlab command window, I still got the following message:
=====================
>> mex -setup

Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler;
see Install MinGW-w64 Compiler. For more options, visit
http://www.mathworks.com/support/compilers/R2017a/.
=====================

Could someone help me with this? Thanks a lot!

This problem existed in 2016b and 2017a still has the same issue? Unacceptable. This should have been fixed.

Shin Yu Chen

Hi, I kept getting the message
"There was a problem installing the third-party software. To resolve this issue, contact Technical Support"
How can I fixed this problem?
Thank you

Liutong

@Shant - Please disregard our last response. Compiler SDK features does not support MinGW 4.9. Please use a supported compiler listed on our website: https://www.mathworks.com/support/compilers.html

@Shant - It could be that you are installing a newer version of MinGW. Check that you are installing MinGW version 4.9 (and haven't selected the box for updates).

I am trying to create and Excel Add-in using Matlab Compiler. I have tried multiple methods of installing MinGW64 Compiler as this was recommended for this purpose. I have tried using the Add-on option in Matlab, downloading the installation files separately and then installing via Matlab (as recommended in the technical support section), and installing the compiler separately and then adding environment variables to connect it to Matlab. In the error log from the compilation it says that the compiler was found, but it still crashes and claims that no supported compiler or SDK was found, and suggests I install MinGW64. Please help fix this issue. Thanks in advance.

I have a problem my matlab says that MinGW-w64 is already installed but when I execute mex-setup it says: "Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install MinGW-w64 Compiler.
For more options, visit http://www.mathworks.com/support/compilers/R2016b/win64.html."

Whats the problem?

Lxbz2

Lxbz2 (view profile)

How to use MATLAB configuring mingw when it is fully installed on my computer? For add-on function would not be helpful, the local network is completely disconnected from the internet.

Wenlong Xu

I want to thank @Samuel Whiteley. I had a problem during the process, but Samuel's way help me out.

Christian

Hi @all,

currently I had to reinstall the MinGw64 Compiler again and encountered the same error I encountered during December of last year (2016).

The solution again was to directly download the files mentioned in the FAQ from Sourceforge an placing them manualy in the downloadfolder used by Matlab for thirdParty sotware.

I also write-protected the files to prevent them from beeing overwritten by the installer, since at least one file was change during the execution of the installer.

Please use the following link, to prevent to be directed to a mirror (the links in the FAQ still follow to at least one different file. I tested it several times in a row, and mostly the core zip-file sometimes changes in size (?!?!) ... therefore:

http://downloads.sourceforge.net/project/tdm-gcc/GNU%20binutils/Previous/binutils-2.24.51-20140703-tdm64-1.zip

http://downloads.sourceforge.net/project/tdm-gcc/MinGW-w64%20runtime/GCC%204.9%20series/mingw64runtime-v3-git20141130-gcc49-tdm64-1.zip

http://downloads.sourceforge.net/project/tdm-gcc/TDM-GCC%204.9%20series/4.9.2-tdm64-1/gcc-4.9.2-tdm64-1-c%2B%2B.zip

http://downloads.sourceforge.net/project/tdm-gcc/GDB/Previous/gdb-7.8.1-tdm64-3.zip

http://downloads.sourceforge.net/project/tdm-gcc/TDM-GCC%204.9%20series/4.9.2-tdm64-1/gcc-4.9.2-tdm64-1-core.zip

Place these files according to the FAQ (https://de.mathworks.com/matlabcentral/answers/313286-why-do-i-see-a-java-util-zip-zipexception-error-in-my-installer-log-file-when-i-try-to-install-the) and render them write-protected (better safe than sorry).

Afterwards run the installer again and hope for the best.
I could reproduce this beahviour several times, therefore I think, there is a bug regarding the mirror-versions delivered by SourceForge.

Greetings,
Christian

@Andreas – Have you tried using the Add-Ons installer from within MATLAB? Or have you tried following the instructions in the link in the Important Note above?

@Gharbi – This sounds like a different issue. Suggest you contact MathWorks technical support.

gharbi leith

hello , when i want to install mingw.mlpkginstall An error has appeared
: Failed to load URL https://localhost:31515/ui/install/supportsoftwareclient/supportsoftwareclient/index.html?

plz i need solution

Using Windows, I moved the files to a location without spaces in the pathname and added the location to PATH and created the MW_MINGW64_LOC variable. Now MATLAB locates the compiler using mex -setup.
When I try to compile yprime.c, MATLAB tells me that the include "math.h" is not found.
So what am I missing?

@Rod - Are you using Windows 7? If so, this may be related to your UAC setting. We are currently investigating.

Rod

Rod (view profile)

Somehow in R2017b I'm not getting any error during installation, but mex keeps saying that no compiler is available :(

Borja21091 - Thank you very much. You have saved me after hours of headache. It worked after following your instructions.

James Briscoe

I have the same error as Brian McCall, I tried the workaround suggested in the description without luck.

Brian McCall

I just downloaded MinGW-64 using the Add-On Explorer. When I run

>> mex -setup

I still get the following error:

Error using mex
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler;
see Install MinGW-w64 Compiler. For more options, visit
http://www.mathworks.com/support/compilers/R2017a/.

Ze Li

Ze Li (view profile)

Ze Li

Ze Li (view profile)

matlab 2015b, help for erreur :
MinGW-w64 succesfful
mex -setup
MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.
Warning: The MATLAB C and Fortran API has changed to support MATLAB
variables with more than 2^32-1 elements. In the near future
you will be required to update your code to utilize the
new API. You can find more information about this at:
http://www.mathworks.com/help/matlab/matlab_external/upgrading-mex-files-to-use-64-bit-api.html.

To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN
libsvm. + Make ==>

make
Building with 'MinGW64 Compiler (C)'.
Error: C:\Users\Nassim\Desktop\SVMTRY\matlab\make.m failed (line 13)
gcc: error: \-fexceptions: No such file or directory

help

roger james

Ziwei Wu

I found a solution for the problem of the failed installation of the third party software.

Just go https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-posix/seh/
and download any of the folders.

After that, install mingw directly and change several environment parameters. There are many tutotial on google. At last, don't forget torestart you computer.

bone Zlase

Why I install it which shows "Error installing third party software MinGW 4.9.2 Core:
java.util.zip.ZipException: archive is not a ZIP archive".Please help me ...I need help..

@Alex – We appreciate your feedback. Unfortunately this Add-On installer is currently not working as you noticed. The description has just been updated. We are working toward a solution.

In the meantime, you can use the following workaround instructions to install MinGW for use with MATLAB:

http://www.mathworks.com/matlabcentral/answers/313286-why-do-i-see-a-java-util-zip-zipexception-error-in-my-installer-log-file-when-i-try-to-install-the

PEDRO OSORIO

como se descargan

Alex R.

Alex R. (view profile)

This is broken. Files are not downloaded correctly (it seems redirects are not followed). I notice that this is an old issue which has still not been fixed. Perhaps Mathworks should stop advertising this as an officially working solution and supported compiler.

The zip files contain:

<html>
<head>
<title>302 Found</title>
</head>
<body>
<h1>302 Found</h1>
The resource was found at <a href="https://netix.dl.sourceforge.net/project/tdm-gcc/GNU%20binutils/Previous/binutils-2.24.51-20140703-tdm64-1.zip">https://netix.dl.sourceforge.net/project/tdm-gcc/GNU%20binutils/Previous/binutils-2.24.51-20140703-tdm64-1.zip</a>;
you should be redirected automatically.

</body>
</html>

... which clearly shows redirects were not followed and the package is left in a broken state.

thanks a lot!

sunfu

sunfu (view profile)

Thank Samuel Whiteley! Your solution works.

happytaotao

Lijo Thomas

Borja21091

@JensHamann I had the same problem and was able to solve it by doing this:

(source -> http://stackoverflow.com/questions/8552580/using-gcc-mingw-as-matlabs-mex-compiler)

If you couldn't install Mingw-w64 using the Add-Ons toolbar of Matlab2016b on Windows, you can use this workaround. Keep this in mind that you need to change the paths according to your installation paths.

- The Mingw-w64 official website redirects you to Win-builds project which is a package manager for a bundle of open source development tools. So, first you need to install the Win-builds.
While installing Win-builds, make sure you are entering a path that does not contain any spaces e.g. C:\Win-builds.

http://win-builds.org/doku.php

- After installing Win-builds, just hit the Process button to install all packages where Mingw-w64 is among them.

- Now that you installed Mingw-w64, you need to define the MW_MINGW64_LOC environment variable which Matlab uses it to detect Mingw-w64.

- To define the environment variable do the following steps:

Control panel\ System\ Advanced system settings\ Advanced\ Environment Variable\ User variables for $YOUR_USER_NAME\ New

- Put Variable name = MW_MINGW64_LOC and Variable value = C:\Win-builds. Notice that the Win-builds puts all executables in C:\Win-builds\bin and by defining this variable, Matlab will automatically scans the bin folder of the path looking for gcc.exe.

- In Matlab, select MinGW compiler to compile C code by executing this:

mex -setup

- Now that you installed the Mingw-w64 and defined the MW_MINGW64_LOC environment variable, it is time to build and test the yprime example. So Launch Matlab and type the following command (Do not forget to modify the path accordingly):

mex -v 'C:\Program Files\MATLAB\R2016b\extern\examples\mex\yprime.c'

- A successful installation will show the following message:

MEX completed successfully.

- Finally, you can test your installation by typing yprime(1,1:4). The answer would be:

ans = 2.0000 8.9685 4.0000 -1.0947

Jens Hamann

I have tried to install with the guide where the 5 files are replaced, but with bad luck! It say in matlab; Warning: "C:\ProgramData\MATLAB\SupportPackages\R2016b\mex\supportpackages\mingw" not found in path.
> In rmpath (line 66)

Any one who knows what to do? I have unstall whole matlab, add ons and so on but nothing works :(

Mahdi ho

I have a disabled Add-ons in my matlab how can I install the file? is there any other method

Hi, I get this error during the installation process:
mingw compiler directory not found. Unable to setup the mingw compiler with mex
Someone can help?

If your error message is
"Error installing third party software MinGW 4.9.2 Core: java.util.zip.ZipException: archive is not a ZIP archive"

Visit this reference page

http://in.mathworks.com/matlabcentral/answers/313286-why-do-i-see-a-java-util-zip-zipexception-error-in-my-installer-log-file-when-i-try-to-install-the

Helix Hsu

Thank you, GuanTou

GuanTou

If your error message is
"Error installing third party software MinGW 4.9.2 Core: java.util.zip.ZipException: archive is not a ZIP archive"

Step 1 : Open the download folder
For example. My matlab version is R2015b.
I need to open
"C:\MATLAB\SupportPackages\R2015b\downloads\mingw_download"

Step 2 : Check all zip file
If your zip size are all only 1KB, you need to download them manually.
For example. There are 5 zip in my folder which are:
"binutils-2.24.51-20140703-tdm64-1.zip"
"gcc-4.9.2-tdm64-1-c++.zip"
"gcc-4.9.2-tdm64-1-core.zip"
"gdb-7.8.1-tdm64-3.zip"
"mingw64runtime-v3-git20141130-gcc49-tdm64-1.zip"
These 5 files with the same filename can be found in following website"
https://sourceforge.net/projects/tdm-gcc/files/

Step 3 : Continue the installation
If you have closed "mingw.mlpkginstall", re-open it and run.

Aliff Zin

can anyone guide me for the installation, once i download the file mingw.mlpkginstall, then what?

Thank you in advance

Felix Dawes

Excellent,
Thank you!

Hui ZHANG

I have solved this problems "There was an error installing third-party software for Support Package mingw: C:\MATLAB\SupportPackages\R2016a\downloads\mingw_download does not contain archives for third-party software used by the support package"
with the information on this page "http://se.mathworks.com/matlabcentral/answers/313298-i-already-have-mingw-on-my-computer-how-do-i-configure-it-to-work-with-matlab"

Felix Dawes

Keep getting this error

"There was an error installing third-party software for Support Package mingw:
C:\MATLAB\SupportPackages\R2016a\downloads\mingw_download
does not contain archives for third-party software used by the support package.

To continue with support package installation:
Use "Install from Internet"
or
Use "Download from Internet" to download the complete set of files, and retry installing from folder."

Any advice would be appreciated

Waheeb Yaqub

I had a problem when installing the third party packages. After trying multiple solutions, only Samuel Whiteley worked perfectly. Thank your awesome help Samuel.

wbsh326

I want to thank Samuel Whiteley. I had a problem during the process, but Samuel's way help me out.

voiceafx

Yields the following error:

"There was an error installing third-party software for Support Package mingw:
C:\MATLAB\SupportPackages\R2016a\downloads\mingw_download
does not contain archives for third-party software used by the support package.

To continue with support package installation:
Use "Install from Internet"
or
Use "Download from Internet" to download the complete set of files, and retry installing from folder."

Dyson Freeman

I've got an error: it shows "Error installing third party software MinGW 4.9.2 Core: java.util.zip.ZipException: archive is not a ZIP archive"
Plz give some advices, thanks.

Wenyu Li

Thanks Samuel Whiteley!

During installation i am asked to login into the mathworks account and whenever i try to login, it gives me "An error has occured" message. How can i install this package..?

Peichao Li

Claire Motion

Installation via add-on broken for me on Win7 running 2016a, comes back with 'third party error.' In the end I followed Samuel Whiteley's comment by installing MingGW manually, and configuring in settings. Restarted MatLAB and it worked. Thanks Samuel!

Hello u all,

i try to install the MINGW-W64 package for compiling C programs on W8.1 Pro Microsoft OS platforms from Matlab with mex command.

Each attempt fails at the installation of the third-party software.

Does anybody already fix such a pb?

The package was download from TDM.

I thank you in advance.

Xavier

Rolfe Power

@MathWorks Supported Compilers Team
I was receiving the same error as Christian, however when I tried the steps outlined in the FAQ (using the unconnected computer) the error switched from "There was a problem installing the third-party software. To resolve this issue, contact Technical Support" to "Something Unexpected Occurred"

xingyu zhang

@Christian – Thanks for the feedback. I encourage you to share your comments on MATLAB Answers.

The links you share should redirect to the same location as the links in the MATLAB Answers FAQ, although sometimes they each direct to different mirror sites. The problem may be with the mirrors and not the links.

Could you try the FAQ links again and let us know if they still don’t work for you?

Christian

Again a long story short...
After some troubleshooting, it seems like the java-code behind this support-package seems to run into some problems downloading the necessairy files from Sourceforge.

While the FAQ generally is correct in replacing the files in

<Downloadfolder>\Mathworks\SupportPackage\R2016b\archives\...

the files with which you are supposed to do so are not correct.

The installer itself tries to download the following files:

http://downloads.sourceforge.net/project/tdm-gcc/GNU%20binutils/Previous/binutils-2.24.51-20140703-tdm64-1.zip

http://downloads.sourceforge.net/project/tdm-gcc/MinGW-w64%20runtime/GCC%204.9%20series/mingw64runtime-v3-git20141130-gcc49-tdm64-1.zip

http://downloads.sourceforge.net/project/tdm-gcc/TDM-GCC%204.9%20series/4.9.2-tdm64-1/gcc-4.9.2-tdm64-1-c%2B%2B.zip

http://downloads.sourceforge.net/project/tdm-gcc/GDB/Previous/gdb-7.8.1-tdm64-3.zip

http://downloads.sourceforge.net/project/tdm-gcc/TDM-GCC%204.9%20series/4.9.2-tdm64-1/gcc-4.9.2-tdm64-1-core.zip

Please use these, to download the third-party tools from Sourceforge and put them in the aformentioned folder. (Please refer to the FAQ !!!!)

This helped me, I hope this will also fix your problems.

PS.: Hope the support does change the links in the FAQ and can initiate a revision of the support-package java-code.

Link to FAQ: https://de.mathworks.com/matlabcentral/answers/311290-faq-how-do-i-install-the-mingw-compiler

Christian

And somewhat, my previous comment is gone ...

Long story short (this time):
The installer had 'acces denied' problem. And I had to take ownership of the folderstructure containing the support package:

(Windows) <Downloadfolder>\Mathworks\SupportPackages\R2016b\archives\

But afterwards I still remained with the already mentiond error message from my previous post, although all zip files stoped corrupting. At least to what I can see.

Christian

Ah, srry I posted the wrong error message:

SSI downloadAndInstallSP Response: {"exception": {"message":"There was a problem installing the third-party software. To resolve this issue, contact Technical Support","title":"Install Error","cause":"java.util.zip.ZipException: archive is not a ZIP archive"}}

@Johannes, @Christian, and @Oskar: The downloaded archive may be incomplete. Please contact Technical Support or see answer #8 in the following MATLAB Answers post:

https://www.mathworks.com/matlabcentral/answers/311290-faq-how-do-i-install-the-mingw-compiler

I'm having the same issue as "Oskar Laudo" and "Christian". The installation of the compiler fails.

Christian

I'm having the same issue as "Oskar Laudo", have there been any information on how to probably solve this issue?

@Mandar - Please contact Technical Support for help with this issue. Or see MATLAB Answers and answer #8 in our FAQ:
https://www.mathworks.com/matlabcentral/answers/311290-faq-how-do-i-install-the-mingw-compiler

Mandar Malve

getting a error called ZIPExtension. The file located is not a zip file

Ok, finally, I did the same as Samuel Whiteley and it works. Thanks you very much!

Hi. I was able to download package but received the following error during install:

"There was an error installing third-party software for Support Package mingw:
C:\MATLAB\SupportPackages\R2016a\downloads\mingw_download
does not contain archives for third-party software used by the support package.

To continue with support package installation:
Use "Install from Internet"
or
Use "Download from Internet" to download the complete set of files, and retry installing from folder."

Any support will be appreciated. Thanks.

jianxin9115

thanks for your suggestions.I installed the compiler and it was ok. now I face another error. when running make.m I get the following error: "error: \-fexceptions: No such file or directory" . but the file exists in directory!!!!

Jiaying You

Installation completed.Thx

Jiaying You

Jiaying You

An error occurred after installing first 3 steps"There was a problem installing the third-party software. To resolve this issue, contact Technical Support"

Oskar Laudo

I got this error while installing the support packages:
"There was a problem installing the third-party software. To resolve this issue, contact Technical Support"

The window: Oops! This page does not exist.

After that I followed the gnumex setting up installation tutorial for Matlab but still getting this error:

No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install
MinGW-w64 Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2016b/win64.html.

How can I fix it?

Oskar Laudo

@Eric - Thanks again for alerting us. The message problem has been resolved.

@Eric - Thanks for alerting us to this message problem. We’re looking into it.

Eric

Eric (view profile)

Is this a Mathworks supported product or team? Attempts to web-mail the team with the Contact link results in undeliverable mail:
supported-compilers-community-profile@mathworks.com
Remote Server returned '554 5.7.0 < #5.7.133 smtp;550 5.7.133 RESOLVER.RST.SenderNotAuthenticatedForGroup; authentication required; Delivery restriction check failed because the sender was not authenticated when sending to this group>'

Jenny Zhang

great!

Finally managed to get the compiler installed. Thanks!

I had problems downloading and installing MinGW, giving me the error "Download Failed: Server returned HTTP response code: 504 for URL:". I am using Windows 10 Pro.

The solution that worked for me was to:
1. Download the compiler from a third party (e.g. https://sourceforge.net/projects/tdm-gcc/files/latest/download?source=typ_redirect)
Follow instructions normally to install it onto the C:\ drive.
2. Manually Configure MinGW for MATLAB (https://www.mathworks.com/help/matlab/matlab_external/compiling-c-mex-files-with-mingw.html)

if anyone can't download files from this site. Use Firefox because with google chrome I can't download files with it here.

Ilyas

Ilyas (view profile)

Once you download the file, open up matlab, navigate to where the file is located, and double click the file from within matlab "Current Folder". It will start installing itself.

This info should have been provided in the description.

Yang Tian

how to download the MATLAB Support for the MinGW-w64 C/C++ Compiler from TDM-GCC

yujinrun

cheng qian

i can't download this file

Please contact Technical Support for java.util.zip.ZipException: archive is not a ZIP archive errors

Vic A

Vic A (view profile)

Error installing third party software MinGW 4.9.2 Core:
java.util.zip.ZipException: archive is not a ZIP archive

Kojiro Saito

I couldn't download the file for several minutes, but now I can.

This is great and it works well with several of our C mex files. It would be fantastic if the FORTRAN compiler (gfortran) was supported also. Is there anyone who has gfortran working and can provide an XML file for this? I have made fruitless tries myself with timestwo.F. It compiles without error but the linker returns errors.

Xiaofei Liu

What I have downloaded is file `mingw.mlpkginstall`, but it does not work, is there anything wrong?

I cannot download it! It sais: Problem at downloading third-party package, and the provided link in case of problem does not work. Can anyone help me?
Thanks

kkjkjkj

CHENTAO TANG

Fuad Numan

Anyone tried it on Win10 64bit? seems not working as well.

ibba abby

NOT WORKING !

cao randoll

Download is not working at all

love you

How can I install it on r2015a?? Thanks

Karan Patel

Thanks.
It works fine.

I cannot install the compiler as I cannot download the compiler. The following message appears:

Download Failed: Server returned HTTP response code: 503 for URL: http://downloads.sourceforge.net/project/tdm-gcc/TDM_GCC%204.9%20series/4.9.2-tdm64-1/gcc-4.9.2-tdm64-1-c%2B%2B.zip?r=&ts=1455224997&use_mirror=iweb

HTTP response code 503 seems to be a "temporary service not available" response but this problem has occurred several times in the last weeks so it doesn't seem so temporary anymore.

Does anyone know what to do to install the compiler?

Thanks

Karan Patel

Download is not working at all

yu smith

James Ryan

A few parts of the download seem to go by quickly (small rectangular popup with fuzzy text). Then there is a new small box labeled Downloads. It has a list of items starting with "GCC Base Files and C Support". Progress just sits there at zero percent. I tried last night, and again today after restarting everything.

Windows 7, MatLab R2016a.

Igal

Igal (view profile)

Download does not work. At all.

farouk ALAO

Hi..
I have window 10 and I have installed MatlabR2016a. I'm not able to download the MinGW-w64 C/C++ Compiler from TDM-GCC , could you please help me out?

Thanks,

I'm not able to download the compiler, could you please help me out?

Thanks,
Kash

I was able to get TDM-GCC-64 gfortran (gcc 5.1.0) working with the included TDM-GCC-64 (gcc 4.9.2) in MATLAB R2015b. See my post at https://www.mathworks.com/matlabcentral/answers/53483-free-fortran-compiler-win-64bit#answer_231294. Anyone wish to validate?

@Abdul - You can find a list of supported compilers for MATLAB Compiler SDK at the following link. Sounds like you will need to install one of these.

http://www.mathworks.com/support/compilers/R2016a/index.html

Note that MinGW is not one of the supported compilers for MATLAB Compiler SDK.

Hi..
I have window 10 and I have installed MatlabR2016a. It completes the whole installation and at the end shows the compiler problem. I have installed MATLAB compiler 6.2 and Matlab compiler SDK 6.2.
In warning message it shows
.....Matlab Compiler 6.2 requires supported compiler for creation of Excel add-ins
.....Matlab compiler SDK 6.2 requires .NETframework for creationof .NET assemblies.
and installation completes and doesn't even show the desktop icon and fly away.

Can anyone help me in completing the installation and run it on my computer...

Regards
Abdul Rashid

I am not able to download this compiler and run it on my computer. Can any one let me know how to use it ?

I have tried installing the compiler multiple times however there is never any option to uncheck the box labelled "Check for updated files on the TDM-GCC server".

When I run "mex -setup" it recognizes the compiler is there but when I run "mbuild -setup" it tells me there is no compiler and that I should download one.

Can someone please help!

@Amit – What releases of MATLAB do you have installed? It may be that the .mlpkginstall file is not finding the correct version of MATLAB.

@Jay and @Sachin – It’s tough to say why the download may not be working. The best action would be to contact Technical Support and share details like a screenshot of the error. You might also check out the following links.

https://www.mathworks.com/matlabcentral/answers/92634-why-do-i-get-a-connection-error-when-installing-or-activating-matlab-or-another-mathworks-product

https://www.mathworks.com/matlabcentral/answers/182042-support-package-installer-can-t-connect-to-mathworks-any-ideas

@Galen – MinGW Fortran is not currently supported with MATLAB.

@Lee – We’ve not seen this before. You might try running:
>> hwconnectinstaller.internal.inform('showmessage', true)
Then installing the MinGW Support Package

@Fubara – It’s tough to say what the issue is from this alone. Perhaps you can contact Technical Support and provide details about what’s in the make.m file along with the verbose output from MEX.

@Vladi - MinGW is not supported with deployment products. You might try MSVC or SDK 7.1 for deployment products.

This installer worked well, but it did not include the MINGW Fortran package that I need (I am linking to Lapack). Is there any way to include Fortran with this? I tried manually installing the package from sourceforge (https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1309.0/) but Matlab is not able to see the installation and link to it when I run the command "mex -setup" The simplest thing to do would be to add Fortran to the package.

I keep getting this error message when I try to run the installer.

Download Failed: Server returned HTTP response code: 416 for URL: ...

Any ideas why? The url is long and will not let me copy and paste. If it is needed I can type it

wang zhi

g

Sachin Lende

I have installed R2016a and when I ran max -setup it says no compiler found so I tried to install MinGW-w64 4.9.2 and during installation process support package installer asked for mathworks user id/password. I provided correct ID/pass all the times still it says "An error has occurred".
Can anyone help me out?
Thanks!

Vladi Katz

I installed the above listing via windows 7 MATLAB R2016a successfully. However when I run:
mbuild -setup

I still get:
Error using mbuild (line 164)
Unable to complete successfully.
No supported compiler or SDK was found. You can install the freely available MinGW-w64 C/C++ compiler; see Install
MinGW-w64 Compiler. For more options, visit http://www.mathworks.com/support/compilers/R2016a/win64.html.

How do I fix this?

For the past two weeks I've been trying to run the compiler on 3 different MATLABs, on various platforms, and I only managed to make it work on a linux system...

Thanks!

I tried to build .mex files with MinGW64, this is what I get each time. I need help.
>> make
Building with 'MinGW64 Compiler (C)'.
Error: C:\Users\User\Downloads\libsvm-3.21\libsvm-3.21\matlab\make.m failed (line 13)
gcc: error: \-fexceptions: No such file or directory

Jay Meyer

Repeatedly get "Error: the application could not connect to MathWorks". I can connect and download other mathworks addons just fine.

Amit Kalita

When I click on to install the downloaded file, it asks for any app to open it. Is it not able to recognize any available app to open? How can this problem be resolved?

@Jan - MinGW OpenMP is not currently supported by MATLAB as noted on the Supported Compilers Page
http://www.mathworks.com/support/compilers/R2016a/

Jan

Jan (view profile)

Installation went just fine. However, I can't compile code using OpenMP, since I keep getting

gcc: error: libgomp.spec: No such file or directory

Sure enough, no such file exists on my machine. Usually, in mingw you can select packages to install (maybe OpenMP was not selected), but here I don't know how to add a package to the install.

omp.h is found allright.

@Ben – Good observation. We’ve now removed the checkbox (for 15b and 16a). Note that MinGW is not a supported compiler for MATLAB Compiler which can be used to create Microsoft Excel add-ins. You can see a list of supported compilers here: http://www.mathworks.com/support/compilers/R2016a/

@James – This may be caused by insufficient space in your %TEMP% directly. You might try clearing some items in the directly. Also the following Answers post may be relevant. If you continue to have trouble, please contact Technical Support.
http://www.mathworks.com/matlabcentral/answers/98459-why-do-i-receive-the-installation-error-archive-is-not-a-zip-archive

@Yongchao – Have you tried uninstalling and reinstalling MinGW from Add-Ons?

Mex (No supported compiler or SDK was found),me too.

I keep getting this error

Error installing third party software MinGW 4.9.2 Core:
java.util.zip.ZipException: archive is not a ZIP archive

Ben Li

Ben Li (view profile)

I added MinGW-w64 a few times, but I never saw the window where I can uncheck the box.
My matlab is R2016a. I am not sure is that a problem?

I was using Excel add-in where C++ compiler is needed. The error message recommends me of adding MinGW-w64. It seems I added it successfully, but Excel add-in cannot find the compiler anyway.

Thanks,

@Adrienne - I suggest you try reinstalling. You can uninstall the current version through Add-Ons. Search for MinGW and select Manage and Uninstall. Then reinstall MinGW from Add-Ons.

Adrienne Siu

I downloaded MinGW-w64 (from tdm64-gcc-4.9.2.exe). However, when I try to install this Matlab support package, I get the error:

Error with pre-download command for package MinGW-w64 a C/C++ compiler from TDM-GCC: Error executing command
"mex_spkg.predownloadMinGW"

Undefined variable "mex_spkg" or class "mex_spkg.predownloadMinGW"..

Do you know a fix for this?

@Andy - You could try the following for C++ 11 functionality:

>> mex –setup C++ % choose mingw c++ compiler
>> mex –v <filename.cpp> CXXFLAGS='$CXXFLAGS -std=c++11'

Andy

Andy (view profile)

Win7 R2016a: trying to compile using -std:c++11, but it doesn't work. Is there anything that should be configured for the c++11 support? (besides from setting the -std:c++11 flag?)
Already tested test file yprime.c and have no problem when compiling it.

@Tiffiny – It may be that you have the wrong MinGW version. You can uninstall the current version through Add-Ons. Search for MinGW and select Manage and Uninstall. Then reinstall MinGW from Add-Ons. During the installation, be sure to uncheck the box for "updated files". (MATLAB currently only supports MinGW 4.9, not newer versions)

http://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html

Tiffiny

My version is R2015b in 64-bit Windows10 system. After installing TDM-GCC, it gives the error messages which asks to uninstall and reinstall TDM-GCC again....

rongyu wang

and I have insatlled vs2015

Navid H

@SHASHANK MADHAV: I had the same problem. Make sure that MinGW Installation Folder Cannot Contain Space!

Markus

Markus (view profile)

If you get an "Wrong compiler" error after installation try to set the needed environment variable MW_MINGW64_LOC="C:\TDM-GCC-64" manually. After that one can choose the compiler using mex -setup.

@Alexander: Yes – you can install offline. First, follow the steps in the following post:
http://www.mathworks.com/matlabcentral/answers/107317-how-do-i-install-hardware-support-packages-on-a-non-internet-pc
Then invoke the Support Package Installer from MATLAB with the following command:
hwconnectinstaller.launchInstaller('SupportCategory','software');

@Shashank: We’ll follow up with you offline for more information.

"Incorrect Installation directory for MinGW" Whats the solution

Alexander S

Is there a way to install this add-on offline? I can download TDM-GCC and install it, however cann not install this addon since I am behind a firewall.

Xiayun Zhao

Xiayun Zhao

Chris Ford

Is it possible import and run libraries like SDL,OPENGL,DIRECTX...etc into matlab?

Chen Junfeng

I'd like to use simulink of Matlab 2015b,therefore, I need this complier.

@Lars - You might try installing again through Add-On Explorer. If the problem persists, please contact Technical Support.

Lars

Lars (view profile)

No success in installing. Found minGW in Add-on explorer, klicked Add and it went on forever, nothing happened, no network activity associated with MATLAB. Random community toolboxes and the like works though. Also tried to download and install separately as proposed by Brian Snider but I cannot get MATLAB to recognize it (I unchecked the tick box during install and ensured library name had no spaces). Not sure what Brian means when he says that addon installer will recognize it.

x!lef

x!lef (view profile)

Thanks!

The issue has been resolved. Contact MathWorks if you continue to experience problems.

To all who had the same problem as I had: I tried installing the compiler again today and now it worked:)

Brian Snider

For those having issues installing this add-on you can go to source forge and manually install TDM-GCC-64 Version 4.9.2, Once that is installed you can run the addon installer in matlab and it will detect the correct version of TDM is installed and successfully register the add-on.

Link to the installer page:

https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1309.0/

Anh Le

Anh Le (view profile)

Aaron Walsh

Hi,
I also have the same problem as the last 3 comments.

Hi,

I have the same with the two pops up windows...

x!lef

x!lef (view profile)

Hey,
I have the same problem as Anna Löbenberg. While installing I never get the opportunity to uncheck the box, instead the warning window telling me to do so, pops up twice. Do you have a solution? Thank you

I tried to install this compiler for many times now. The window that tells me where to uncheck the box is popping up even twice. But the window where I may uncheck the box is not appearing anywhere. So - at the end I get the message that I have installed the wrong version of the compiler. I am really wondering why?

@Martin - Thank you for letting us know. We are currently investigating the issue.

Martin Cuma

Just tried to install the add on today and failed. After some fishing around it looks like the link to the TDM-GCC archive has changed, as that would be the tdm64-gcc-4.9.2.exe executable is a text file with:

301 Moved Permanently
The resource has been moved to {https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1309.0/tdm64-gcc-4.9.2-3.exe/download}; you should be redirected automatically.

I appreciate if you could check into this and if applicable fix the add on.

@Luqman - There is a check box for updates during the installation. If you do not clear the check box, TDM-GCC installs an unsupported version and MATLAB displays the following error message: "MinGW compiler not setup for use with MEX. Please install MinGW version 4.9.2"

In this case you should uninstall and then reinstall the compiler from the Add-Ons menu. Be sure to clear the box for "Check for updated files on the TDM-GCC Server".

For more information about installing MinGW-w64, see "Install MinGW-w64 Compiler":
http://www.mathworks.com/help/matlab/matlab_external/install-mingw-support-package.html

Luqman Subki

I got compiler setup failed at the end with the following error:
'MinGW compiler not setup for use with MEX. Please install Min GW version 4.9.2'

Any suggestion what should i do?

Abbas Cheddad

Hi Dave,

It is working for me now.

Thank you!

@Abbas: Thanks for sharing this comment. Hopefully I can clear this up a bit for others.

The File Exchange entry installs support for the MinGW GCC version 4.9.2 from TDM-GCC along with the MinGW GCC compiler. Be sure to uncheck the update box as described in the help link to avoid installing a different version of MinGW (should be GCC 4.9.2). The version number 15.2.1 that you see refers to the whole package (MATLAB compiler support and the compiler), it is not necessarily related to the version of GCC installed.

Abbas Cheddad

I followed the exact instructions. When "Select support package to install" window pops-up, a display of MinGW Ver. 4.9.2 on the left hand side panel is displayed but on the right hand side one Ver 15.2.1 is displayed instead. Unchecking the update check-box is useless in this case as it installs Ver 15.2.1 anyway.

Even on the main Add On window it says:

"MATLAB Support for the MinGW-w64 C/C++ Compiler from TDM-GCC version 15.2.1.0"

And right underneath it:

"Install the MinGW-w64 compiler for Windows (GCC version 4.9.2)"!!

Sriram

Sriram (view profile)

MATLAB Release Compatibility
Created with R2015b
Compatible with R2015b to R2018b
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: YOKOGAWA GM10 communication interface

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor