当前位置:网站首页>The relationship between libc, glibc and glib

The relationship between libc, glibc and glib

2022-06-10 04:19:00 sun007700

glibc_ Baidu Encyclopedia

glibc and libc All are Linux Under the C function library .libc yes Linux Under the ANSI C function library ;glibc yes Linux Under the GUN C function library .

ANSI C Function libraries are basic C Language function library , Contains C Language's most basic library functions . This library can be divided into... According to the header file 15 Parts of , These include :

  1. <ctype.h>: A function prototype that contains a function used to test a characteristic character , And the function prototype used to convert uppercase and lowercase letters ;

  2. <errno.h>: Define macros to report error conditions ;

  3. <float.h>: Contains the floating point size limit of the system ;

  4. <math.h>: Function prototype containing mathematical library functions ;

  5. <stddef.h>: Includes performing some calculations C Common function definitions used ;

  6. <stdio.h>: Function prototype containing standard input / output library functions , And the information they use ;

  7. <stdlib.h>: Contains numbers converted to text , And a function prototype for converting text to numbers , And memory allocation 、 Function prototype of random numbers and other practical functions ;

  8. <string.h>: Contains the function prototype of the string handler ;

  9. <time.h>: Function prototype and type containing time and date operations ;

  10. <stdarg.h>: Contains function prototypes and macros , Parameter list for functions that handle unknown values and types ;

  11. <signal.h>: Contains function prototypes and macros , Used to handle various conditions that may occur during program execution ;

  12. <setjmp.h>: Contains prototypes of functions that can bypass general function calls and return sequences , That is, nonlocal jump ;

  13. <locale.h>: Contains function prototypes and other information , So that the program can be modified according to the region in which it is running .

  14. The representation of regions enables the computer system to process different data expression conventions , Such as the date of the world 、 Time 、 Dollars and big numbers ;

  15. <assert.h>: Contains macros and information , For diagnosis , Help program debugging .

The above library functions are supported in various ways C Linguistic IDE All of them have .

GNU C A function library is something like a third-party plug-in . because Linux Yes, it is C Written language , therefore Linux Some of the operations of the are done with C The realization of language , therefore ,GUN The organization has developed a C Language library so that we can make better use of C Language development is based on Linux Operating system programs . But now the difference is Linux The release of has a different approach to these two libraries , Some may have been integrated into the same library .

glibc yes linux below c Implementation of standard library , namely GNU C Library.glibc Itself is GNU Flag C Standard library , And it gradually became Linux Standards for c library , and Linux Under the original standard c library Linux libc Gradually no longer maintained .Linux The following criteria c The library doesn't just have this one , Such as uclibc、klibc, And the above mentioned Linux libc, however glibc It is undoubtedly the most used .glibc stay /lib In the catalog .so File for libc.so.6.

glib and glibc Basically there is not much connection , Perhaps the only thing in common is , All of them are C Programming needs to call the library .

glib yes Gtk+ Kuhe Gnome The basis of .glib It can be used on multiple platforms , such as Linux、Unix、Windows etc. .glib For many standard 、 frequently-used C Language structure provides a corresponding substitute  [1]  .

glib yes GTK+ The foundation of the library , It consists of the base type 、 Support for core applications 、 Practical functions 、 The data type and object system are composed of five parts , Can be in [http://www.gtk.orggtk Website ] Download its source code . It is a comprehensive, practical and lightweight C library , It provides C The definition of common data structure of language 、 Related processing functions , Interesting and useful macros , Portable packaging and some runtime functionality , Like an event loop 、 Threads 、 Dynamic invocation 、 Object system, etc API.GTK+ It's portable , Of course glib It's also portable , You can linux Next , It can also be in windows Use it under . Use gLib2.0(glib Of 2.0 edition ) Written applications , When compiling, you should add... To the compilation command pkg-config --cflags --libs glib-2.0, Such as :

1

gcc pkg-config --cflags --libs glib-2.0 hello.c -o hello

Use glib The most famous is GNOME 了 .

原网站

版权声明
本文为[sun007700]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206100414265169.html

随机推荐