sepideh sepideh - 1 year ago 420
C++ Question

Error using mex: No supported compiler or SDK was found

Despite the fact that I get the following message by typing

mex -setup

>> mex -setup
MEX configured to use 'Microsoft Visual C++ 2013 Professional (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:

To choose a different language, select one from the following:
mex -setup C++
mex -setup FORTRAN

When I want to compile a certain
file, I get the following error:

>> mex -g mx_minimum_power.cpp cvm_em64t_debug.lib
Error using mex
No supported compiler or SDK was found. For options, visit

Answer Source

Compiling .cpp file uses C++ compiler (.c file uses C compiler).
Use mex -setup C++, for setting up C++ compiler.

Apparently source file extension does matter when using mex instruction...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download