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
Write a test program (name it for example glibc-version.c
):
#include
#include
#include
int main(int argc, char *argv[]) {
printf("GNU libc version: %s\n", gnu_get_libc_version());
exit(EXIT_SUCCESS);
}
and compile it with the gcc-4.4 compiler:
gcc-4.4 glibc-version.c -o glibc-version
When you execute ./glibc-version
the used glibc version is shown.