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.

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2023년 6월 27일
편집: MathWorks Support Team 2023년 8월 1일

0 개 추천

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.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품

릴리스

R2007b

Community Treasure Hunt

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

Start Hunting!

Translated by