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

432 views (last 30 days)
I would like to determine the platform and compiler version that I am using.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Jun 2018
从系统命令行编译器称为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:
Linux
gcc-v
gccversion 3.2.3
g95-v
gccversion 4.0.3 (g95 0.90!) Jul 17 2006
g77-v
gccversion 3.2.3
Mac
gcc-3.3 -v
gccversion 3.3 20030304 (Apple Computer, Inc. build 1809)
Platforms supported in previous versions of MATLAB:
DEC Alpha
cc-V | grep UNIX
DECC V5.9-008 on Digital UNIX V4.0 (Rev. 1229)
DigitalUNIX Compiler Driver 3.11
f77-what
CompaqFortran 77 Driver V5.3-11
CompaqFortran 77 V5.3-189-449BB
HP-UX
what`which cc`
HP92453-01 A.11.01.00 HPC Compiler
what`which f90`
HP-UX f9020000117 (163844)B3907DB/B3909DB B.11.01.11
HPF90 v2.4
HP-700
what`which cc`
HP92453-01 A.10.32.30 HPC Compiler
what`which f90`
HP-UX f9020000107 (183817)B3907DB/B3909DB B.10.20.19
HPF90 v2.4
IBM RS6000
lslpp-l ibmcxx.cmp
3.6.6.0 COMMITTEDIBM C and C++ Compilers
lslpp-cl xlfcmp
5.1.0.0承诺I XL Fortran Compiler
SGI
cc-version
MIPSproCompilers: Version 7.3.1.1m
f77-version
MIPSproCompilers: Version 7.2.1
Solaris
cc-V
cc: Sun C5.5 Patch 112760-08 2004/02/20
f90-V
f90: Sun Fortran95 7.1 Patch 112762-09 2004/01/26
f77-V
f90: Sun Fortran95 7.1 Patch 112762-09 2004/01/26
3 Comments
Walter Roberson
Walter Roberson on 10 Mar 2020
GCC should be downwards compatible
Shudder, NO
If you require a software package to be downwards compatible, then you doom yourself to supporting every single bug that ever made it into released code, on the grounds that someone might have taken advantage of the bug and now your newer versions have to match the same buggy behavior forever for the sake of being downwards compatible.
No, GCC should not be downwards compatible; it just should not deliberately introduce incompatibilities without considering the existing installations.

Sign in to comment.

More Answers (0)

下载188bet金宝搏

Community Treasure Hunt

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

Start Hunting!