繁体   English   中英

unix中的c ++编译器版本

[英]c++ compiler version in unix

我想知道unix环境下服务器的编译器版本(CC)。 显然我找到了安装编译器的正确目录

    cngsitbe1a@/opt/SUNWspro/prod/bin$ ls -ltr
    total 82225
    -rwxr-xr-x   1 root     sys        22864 Apr 30  2007 libsunperf_check
    -rwxr-xr-x   1 root     sys      1193036 May  3  2007 acomp
    -rwxr-xr-x   1 root     sys       480752 May  3  2007 fbe
    -rwxr-xr-x   1 root     sys      8298296 May  3  2007 cg
    -rwxr-xr-x   1 root     sys      6454044 May  3  2007 iropt
    -rwxr-xr-x   1 root     sys      5294740 May  3  2007 ccfe
    -rwxr-xr-x   1 root     sys       534392 May  3  2007 CClink
    -rwxr-xr-x   1 root     sys       116212 May  3  2007 c++filt
    -rwxr-xr-x   1 root     sys        18580 May  3  2007 stdlibfilt
    -rwxr-xr-x   1 root     sys       539124 May  3  2007 CCadmin
    -rwxr-xr-x   1 root     sys         7408 May  3  2007 dem
    -rwxr-xr-x   1 root     sys          519 May  3  2007 ptclean
    -rwxr-xr-x   1 root     sys        30936 May  3  2007 cb
    -rwxr-xr-x   1 root     sys        16004 May  3  2007 nmf
    -rwxr-xr-x   1 root     sys        19216 May  3  2007 lpfx
    -rwxr-xr-x   1 root     sys        14944 May  3  2007 flip
    -rwxr-xr-x   1 root     sys        17172 May  3  2007 dag
    -rwxr-xr-x   1 root     sys         5118 May  3  2007 cflow
    -rwxr-xr-x   1 root     sys       101484 May  3  2007 cscope
    -rwxr-xr-x   1 root     sys         8920 May  3  2007 runtime.c
    -rwxr-xr-x   1 root     sys        63004 May  3  2007 ctrace
    -rwxr-xr-x   1 root     sys         3361 May  3  2007 ctcr
    -rwxr-xr-x   1 root     sys        21788 May  3  2007 xref
    -rwxr-xr-x   1 root     sys         4863 May  3  2007 cxref
    -rwxr-xr-x   1 root     sys        11508 May  3  2007 irprint
    -rwxr-xr-x   1 root     sys       358548 May  3  2007 CC
    -rwxr-xr-x   1 root     sys       246684 May  3  2007 lint
    -rwxr-xr-x   1 root     sys       276584 May  3  2007 cc

但是,当我使用该命令查找CC版本时,没有给出有用的信息。

    cngsitbe1a@/opt/SUNWspro/prod/bin$ CC -V
    -bash: CC: command not found

此外,当在服务器A中编译二进制文件并在服务器B中部署/运行时,服务器B的编译器是否会影响二进制文件的触发? 能够帮助?

采用

./CC -V

调用CC可执行文件,因为/opt/SUNWspro/prod/bin不是PATH变量的一部分。


正如评论中所提到的,大多数编译器使用--version选项来检索当前版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM