how do i see the current version of compiler installed in the unix machine

how do i see the current version of compiler installed in the unix machine
[81 byte] By [reply2me@a] at [2007-11-26 17:26:07]
# 1

Hi

For the compiler

$ CC -V

CC: Sun C++ 5.7 Patch 117830-02 2005/03/30

or

$ cc -C

cc: Sun C 5.7 Patch 117836-03 2005/05/11

For full details,

$ version

Machine hardware:sun4u

OS version: 5.8

Processor type:sparc

Hardware:SUNW,Sun-Blade-1500

The following components are installed on your system:

Sun Studio 10

Sun Studio 10 C Compiler

Sun Studio 10 C++ Compiler

Sun Studio 10 Tools.h++ 7.1

Sun Studio 10 C++ Standard 64-bit Class Library

Sun Studio 10 Garbage Collector

Sun Studio 10 Fortran 95

Sun Studio 10 Debugging Tools (including dbx)

Sun Studio 10 Debugger GUI

Sun Studio 10 Performance Analyzer (including collect, ...)

Sun Studio 10 X-Designer

Sun Studio 10 VIM editor

Sun Studio 10 XEmacs editor

Sun Studio 10 Native Connector Tool

Sun Studio 10 LockLint

Sun Studio 10 Building Software (including dmake)

Sun Studio 10 Documentation Set

version of "/nobackup/pfloyd/opt/SUNWspro/bin/../prod/bin/../../bin/cc": Sun C 5.7 Patch 117836-03 2005/05/11

version of "/nobackup/pfloyd/opt/SUNWspro/bin/../prod/bin/../../bin/CC": Sun C++ 5.7 Patch 117830-02 2005/03/30

version of "/nobackup/pfloyd/opt/SUNWspro/bin/../prod/bin/../../bin/f90": Sun Fortran 95 8.1 Patch 117834-02 2005/03/30

version of "/nobackup/pfloyd/opt/SUNWspro/bin/../prod/bin/../../bin/dbx": Sun Dbx Debugger 7.4 117844-01 2005/03/05

version of "/nobackup/pfloyd/opt/SUNWspro/bin/../prod/bin/../../bin/analyzer": Sun Performance Analyzer 7.4 2005/01/07

version of "/nobackup/pfloyd/opt/SUNWspro/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.6 117838-01 2005/03/04

Paul

Paul_Floyda at 2007-7-8 23:54:09 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Let me add that the "version" command is installed as part of the Sun Studio installation, in the same directory as the compiler commands. So you need to know where the compilers are, or have the compiler installation directory on your execution path.

If more than one release of Sun Studio is installed, you can run each "version" or compiler command separately for each release.

clamage45a at 2007-7-8 23:54:09 > top of Java-index,Development Tools,Solaris and Linux Development Tools...