No supported compiler was found.

151 views (last 30 days)
Upon trying to compile a file using mex, I receive the following error message:
Error using mex
No supported compiler was found.
I installed Visual Studio 2017 with support for C++ and actually
mex -setup C++
lets me choose my compiler.
Which additional diagnostics could I run in order to pin down the problem?
Walter Roberson
Walter Roberson on 1 Dec 2020
By the way, Visual Studio does not install the C compiler by default.

Sign in to comment.

Accepted Answer

Matt J
Matt J on 8 Apr 2019
If you just run
>> mex -setup
it should present you with the compilers that Matlab can actually see. That should provide a clue.
  1 Comment
Walter Roberson
Walter Roberson on 8 Apr 2019
mex -v -setup
can help diagonse problems.

Sign in to comment.

More Answers (0)


Find more on Troubleshooting in MATLAB Compiler SDK 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!