I faced an error “No supported compiler or SDK was found.” when I tried to compile mexlised cpp file on MATLAB2015a (Mac 10.10.5).
MATLAB complains as fellow when “mex -setup” command is issued.
“No supported compiler or SDK was found.” which means that either no compiler has been installed on your system or not properly been linked with MATLAB’s mex.
The following link worked for my case and I could successfully compile mexlised cpp files.
And the attached xcode7_mexopts
Hope this save some your time.
Here is a workaround for setting up mex in MATLAB2015a within MacOS Yosemite.
You need to install two software packages: Command Line Tools (CLT) and gfortran.
1. Installation of CLT
Simply download the following and install. (You need Xcode 6.3 or higher as a prerequisite).
2. Installation of gfortlan
go to the following site and download gfortran 5.0
Direct download link for gfortran 5.0
You will have gfortran-5.0-bin.tar in your downloaded folder.
Open terminal console and type the following for gfortran installation
sudo tar -xvf gfortran-5.0-bin.tar -C /.
Note that don’t forget “/.” at the end of the command line.
You will see some log messages copying files into your /usr/local/bin and related folders.
For verification, just type “mex -setup FORTRAN” in MATLAB console. This should show you the following message.
MEX configured to use 'gfortran' for FORTRAN 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:
This article is Just for future reference.
I faced a MATLAB bug: BLAS loading error: dlopen: cannot load any more object with static TLS.
My MATLAB version is 2014a running on Ubuntu 14.04.01
Here is the workaround and what you only need to do is
1. Download the attached file from the following link.
2. Replace libiomp5.so file at /R2014a/sys/os/glnxa64 (Ubuntu)