Why does the MEX -SETUP command not list my g++ compiler in LINUX?

I was trying to setup the compiler to compile C++ mex-files. I installed the MATLAB in my HOME directory and I see that I have a g++ compiler supported for this version is installed on my computer, but the problem is when I use the command mex -setup, it is not able to find the g++ compiler on my machine. Its finding only the in-built compilers with MATLAB. I don't know if I may need to set the path somewhere to find the g++ compiler on my computer.

 Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 27 Jun. 2023
Bearbeitet: MathWorks Support Team am 1 Aug. 2023

0 Stimmen

In UNIX platforms, "mex -setup" lists only the options file for the installed compilers unlike in Windows platform where the entire set of compilers are listed. In your case, selecting the gcc option will enable MATLAB to pick up the corresponding options file gccopts.sh which then enables MEX to select the g++ compiler installed in your machine.
Note that MEX also automatically confirms if the installed compiler version is supported by MATLAB 7.4 (R2007b).
To see the list of supported compilers in R2007b, visit here:
To determine the version of compiler you are using, see the Related Solution below.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB Compiler finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2007b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by