Difference between revisions of "GNU C library"

From Teknologisk videncenter
Jump to: navigation, search
m
m (bash GLIBC Version=)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=Checking which GNU C Library version=
 
=Checking which GNU C Library version=
To check which GCLIB you are using run this program.
+
To check which GCLIB you are using run this small c program.
 
<source lang=c>
 
<source lang=c>
 
#include <stdio.h>
 
#include <stdio.h>
Line 10: Line 10:
 
   return 0;  
 
   return 0;  
 
}
 
}
 +
 +
// Example output from this command:
 +
//    GNU C Library version is 2.28
 +
//    GNU C Library release is stable
 
</source>
 
</source>
  
or  
+
or this shell command
  
 
<source lang=bash>
 
<source lang=bash>
 
heth@mars:~/bin$ ldd --version
 
heth@mars:~/bin$ ldd --version
 
ldd (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19
 
ldd (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19
Copyright (C) 2014 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.
 
Written by Roland McGrath and Ulrich Drepper.
 
heth@mars:~/bin$
 
 
</source>
 
</source>
  
Line 27: Line 26:
 
*[https://www.gnu.org/software/libc/manual/pdf/libc.pdf The GNU C Library Reference Manual - GNU.org] (Loads PDF)
 
*[https://www.gnu.org/software/libc/manual/pdf/libc.pdf The GNU C Library Reference Manual - GNU.org] (Loads PDF)
 
**[https://www.gnu.org/software/libc/manual/html_node/index.html Same as HTML]
 
**[https://www.gnu.org/software/libc/manual/html_node/index.html Same as HTML]
[[Category:Linux]][[Category:GNU]]
+
*[https://www.gnu.org/software/libc/manual/html_node/Concept-Index.html Index]
 +
[[Category:Linux]][[Category:GNU]][[Category:C]]

Latest revision as of 08:17, 21 December 2022

Checking which GNU C Library version

To check which GCLIB you are using run this small c program.

#include <stdio.h>
#include <gnu/libc-version.h>

int main(void) {
  printf("GNU C Library version is %s\n", gnu_get_libc_version());
  printf("GNU C Library release is %s\n", gnu_get_libc_release());
  return 0; 
}

// Example output from this command:
//    GNU C Library version is 2.28
//    GNU C Library release is stable

or this shell command

heth@mars:~/bin$ ldd --version
ldd (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19

Links