C++ 如何查出安装在AIX box上的xlC版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4368866/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 15:14:52  来源:igfitidea点击:

How can you find out the version of xlC installed on AIX box

c++compiler-constructionversionaixxlc

提问by grobartn

So this should be quite simple but just want to see if I got it right.

所以这应该很简单,但只是想看看我是否做对了。

I am trying to find out what version of xlC compiler is installed on AIX box.

我试图找出 AIX 机器上安装了哪个版本的 xlC 编译器。

I tried xlC -v/xlc --version which is not supported by the compiler.

我尝试了编译器不支持的 xlC -v/xlc --version。

I tried lslpp -L | grep xlC

我试过 lslpp -L | grep xlC

I get following output but it confuses me (i am releatively new to UNIX world)

我得到以下输出,但它让我感到困惑(我对 UNIX 世界比较陌生)

  xlC.adt.include            8.0.0.0    C     F    C Set ++ Application
  xlC.aix50.rte              8.0.0.0    C     F    C Set ++ Runtime for AIX 5.0
  xlC.cpp                    6.0.0.0    C     F    C for AIX Preprocessor
  xlC.msg.en_US.cpp          6.0.0.0    C     F    C for AIX Preprocessor
  xlC.msg.en_US.rte          8.0.0.0    C     F    C Set ++ Runtime
  xlC.rte                    8.0.0.0    C     F    C Set ++ Runtime

This is list on installed packages on box but whats the significance of listing .cpp file.

这是盒子上已安装软件包的列表,但列出 .cpp 文件的意义是什么。

And which version is on my box?

我的盒子上有哪个版本?

6.0 or 8.0

6.0 或 8.0

Thanks

谢谢

回答by Fred Larson

Try xlC -qversion

尝试 xlC -qversion

回答by Ted

Try lslpp -l | grep -i vacppand check for lines about the C/C++ Compiler:

尝试lslpp -l | grep -i vacpp检查有关 C/C++ 编译器的行:

vacpp.cmp.core            9.0.0.11  APPLIED    IBM XL C/C++ Compiler
vacpp.cmp.core             9.0.0.0  COMMITTED  IBM XL C/C++ Compiler

This means I have 9.0 installed with a subsequent PTF added. My corresponding xlc version information looks like this:

这意味着我安装了 9.0,并添加了后续的 PTF。我对应的 xlc 版本信息如下所示:

% xlc -qversion=verbose
IBM XL C/C++ Enterprise Edition for AIX, V9.0
Version: 09.00.0000.0011
Driver Version: 09.00(C/C++) Level: 090810
C Front End Version: 09.00(C/C++) Level: 090730
C++ Front End Version: 09.00(C/C++) Level: 090730
High-Level Optimizer Version: 09.00(C/C++) and 11.01(Fortran) Level: 090812
Low-Level Optimizer Version: 09.00(C/C++) and 11.01(Fortran) Level: 090902

Also the xlc/rte entries you found are for the C/C++ Runtime, which will depend on the OS version and are not as closely linked to the compiler version. This source of confusion is also mentioned in the link below.

此外,您找到的 xlc/rte 条目是针对 C/C++ 运行时的,这将取决于操作系统版本,并且与编译器版本没有那么密切的联系。下面的链接中也提到了这种混淆的来源。

See http://www-01.ibm.com/support/docview.wss?uid=swg21652272

请参阅http://www-01.ibm.com/support/docview.wss?uid=swg21652272

回答by Cristian

cc –qversion or xlc -qversion or xlC –qversion