How can I change default c++ compiler in MATLAB 2017b ?
Show older comments
So I have MATLAB2017b version. I want to use Matlab in combination with TwinCat to control some motors and sensors. I need Visual Studio 20XX to run the program.
I have installed VisualStudio 2013 professional and other versions of it, and also Visual Studio 2017. When I run "mex -setup" in Matlab, its says "MEX configured to use 'MinGW64 Compiler (C)' for C language compilation.". I cannot see any other languages from where I could choose except the default "MinGW64". I have looked at the compatibility issues as well and this version of Matlab should run perfectly with VisualStudio 2013 professional or a higher version. I have tried to install different versions and it still does not see it.
Can anyone offer a solution? I have been searching for days already and nothing has worked (including some patches I have found online).
4 Comments
Walter Roberson
on 26 Oct 2018
Please show the output of
mex -v -setup c++
Diana Becea
on 29 Oct 2018
Edited: Walter Roberson
on 29 Oct 2018
Walter Roberson
on 29 Oct 2018
Try unsetting the environment variable MW_MINGW64_LOC
Diana Becea
on 29 Oct 2018
Edited: Walter Roberson
on 29 Oct 2018
Accepted Answer
More Answers (1)
Bruno Luong
on 29 Oct 2018
0 votes
It might not correctly detect if you install MSVS on drive other than C:
1 Comment
Diana Becea
on 29 Oct 2018
Categories
Find more on MATLAB Support for MinGW-w64 C/C++ Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!