How can I determine the platform and compiler version that I am using?

237 visualizzazioni (ultimi 30 giorni)

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 2 Set 2022
Modificato: MathWorks Support Team il 2 Set 2022
Compilers called from the system command line do not display graphical splash screens advertising their version number. It is therefore not always obvious which version of a given C or Fortran compiler is installed.
Below are a number of examples that can be used to determine the compiler version on a specific machine. Each platform section lists version info commands for several common compilers. The fully indented sections are example output from the system command prompt.
You can find a list of compilers supported for use with MATLAB here:
Currently supported platforms:
gcc -v
gcc version 3.2.3
g95 -v
gcc version 4.0.3 (g95 0.90!) Jul 17 2006
g77 -v
gcc version 3.2.3
gcc-3.3 -v
gcc version 3.3 20030304 (Apple Computer, Inc. build 1809)
Platforms supported in previous versions of MATLAB:
DEC Alpha
cc -V | grep UNIX
DEC C V5.9-008 on Digital UNIX V4.0 (Rev. 1229)
Digital UNIX Compiler Driver 3.11
f77 -what
Compaq Fortran 77 Driver V5.3-11
Compaq Fortran 77 V5.3-189-449BB
what `which cc`
HP92453-01 A.11.01.00 HP C Compiler
what `which f90`
HP-UX f90 20000117 (163844) B3907DB/B3909DB B.11.01.11
HP F90 v2.4
what `which cc`
HP92453-01 A.10.32.30 HP C Compiler
what `which f90`
HP-UX f90 20000107 (183817) B3907DB/B3909DB B.10.20.19
HP F90 v2.4
IBM RS6000
lslpp -l ibmcxx.cmp COMMITTED IBM C and C++ Compilers
lslpp -cl xlfcmp COMMITTED I XL Fortran Compiler
cc -version
MIPSpro Compilers: Version
f77 -version
MIPSpro Compilers: Version 7.2.1
cc -V
cc: Sun C 5.5 Patch 112760-08 2004/02/20
f90 -V
f90: Sun Fortran 95 7.1 Patch 112762-09 2004/01/26
f77 -V
f90: Sun Fortran 95 7.1 Patch 112762-09 2004/01/26
  2 Commenti
Walter Roberson
Walter Roberson il 2 Set 2022
The above table shows Mac as
gcc-3.3 -v
However, gcc is not supported on MacOS. Only xcode is supported for MacOS (though I would have to research how far back that goes.) The command line compiler used by xcode is clang and to see its version you can use one of
clang -v
clang --version
cc -v
cc --version

Accedi per commentare.

Più risposte (0)


Scopri di più su Manage Products in Help Center e File Exchange


Community Treasure Hunt

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

Start Hunting!

Translated by