2010年5月10日 星期一

查看 gcc and glibc版本

gcc版本
gcc -v

glibc版本
locate glibc.so
/lib/glibc.so.6

some logs from my system
nelsonchung@nelsonchung-laptop:/media/4G/kegel-crosstool$ locate libc.so
/lib/libc.so.6
/lib/tls/i686/cmov/libc.so.6
/usr/lib/libc.so
nelsonchung@nelsonchung-laptop:/media/4G/kegel-crosstool$ /libc.so.6
bash: /libc.so.6: 沒有此一檔案或目錄
nelsonchung@nelsonchung-laptop:/media/4G/kegel-crosstool$ /lib/libc.so.6
GNU C Library (EGLIBC) stable release version 2.10.1, by Roland McGrath et al.
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.1.
Compiled on a Linux >>2.6.24-23-server<< system on 2010-01-03.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
For bug reporting instructions, please see:
.
nelsonchung@nelsonchung-laptop:/media/4G/kegel-crosstool$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.1-4ubuntu9' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i486 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9)

Reference:
http://blog.csdn.net/jcwKyl/archive/2010/01/07/5153334.aspx

透過Facebook分享

1 則留言:

鍾志均 提到...

這邊有提供code如何寫

http://blog.csdn.net/jcwKyl/archive/2010/01/07/5153334.aspx


#include
#include
int main (void) { puts (gnu_get_libc_version ()); return 0; }