Check glibc version for a particular gcc compiler

后端 未结 8 1253
既然无缘
既然无缘 2020-11-29 19:13

I have two gcc compilers installed on my system, one is gcc 4.1.2 (default) and the other is gcc 4.4.4. How can I check the libc version used by

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 19:41

    even easier

    use ldd --version

    This should return the glibc version being used i.e.

    $ ldd --version
    
    ldd (GNU libc) 2.17
    Copyright (C) 2012 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    

    ...

    which is the same result as running my libc library

    $ /lib/libc.so.6 
    
    
    GNU C Library (GNU libc) stable release version 2.17, by Roland McGrath et al.
    Copyright (C) 2012 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.
    

    ...

提交回复
热议问题