How to get Matlab C++ compiler name in my program?
1 view (last 30 days)
I am developing a C++ application and I need to get the C/C++ compiler name of Matlab (2017b and newer). I have already tried using Matlab Engine C++ API for launching an engine and then running:
mex -setup C++
But this approach is taking a long time to be completed. Is there any better approach to get the C/C++ compiler name of Matlab without launching a Matlab instance (e.g. reading a configuration file, etc.)?
Rik on 25 Feb 2022
If starting Matlab is fine, then this code will get you all the info you need:
error('C++ compiler not found')
If that is not an option, you could try reading the xml file in the prefdir:
Although you should be aware that I could only find this file on Windows.