← 返回命令列表

Linux command

glib 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Compile with GLib

gcc [program.c] $(pkg-config --cflags --libs glib-2.0) -o [program]

Get GLib version

pkg-config --modversion glib-2.0

Generate enum types

glib-mkenums --template [enum.h.template] [header.h] > [enum-types.h]

Compile GLib resources

glib-compile-resources [resources.gresource.xml] --target=[resources.c]

说明

GLib is a general-purpose utility library used by GTK and GNOME. It provides data structures, portability wrappers, event loops, threads, and many utilities for C programming. GLib is not a command but a library. Related tools include glib-compile-resources, glib-mkenums, and glib-genmarshal.

FAQ

What is the glib command used for?

GLib is a general-purpose utility library used by GTK and GNOME. It provides data structures, portability wrappers, event loops, threads, and many utilities for C programming. GLib is not a command but a library. Related tools include glib-compile-resources, glib-mkenums, and glib-genmarshal.

How do I run a basic glib example?

Run `gcc [program.c] $(pkg-config --cflags --libs glib-2.0) -o [program]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more glib examples?

This page includes 4 examples for glib, plus related commands for nearby Linux tasks.