gobject-introspection
1.1、gobject-introspection简介
是什么 ?:a middleware layer between C libraries (using GObject) and language bindings
开发语言:C
开发组织:GNOME
官方主页:https://gi.readthedocs.io
源码仓库:https://gitlab.gnome.org/GNOME/gobject-introspection
1.2、通过包管理器安装gobject-introspection
操作系统包管理器安装命令
macOSHomeBrewbrew install gobject-introspection
GNU/LinuxHomeBrewbrew install gobject-introspection
aptsudo apt-get install -y gobject-introspection
CentOSyumsudo yum install -y gobject-introspection
dnfsudo dnf install -y gobject-introspection
openSUSEzyppersudo zypper install -y gobject-introspection
Alpine Linuxapksudo apk add gobject-introspection

Arch Linux

ArcoLinux

Manjaro Linux

pacmansudo pacman -Syyu --noconfirm
sudo pacman -S    --noconfirm gobject-introspection
Gentoo LinuxPortagesudo emerge gobject-introspection
1.3、通过编译源码安装gobject-introspection 

step1、安装依赖

所有时Terminal + Shell + GNU CoreUtils
下载时cURL
解压时tar + xz
编译时mesonninjagcc / GCC | Clang / LLVMGLib
运行时
  • glibc ( libc.solibm.solibdl.solibpthread.sold-linux-x86-64.so )
  • GLib ( libglib-2.0.solibgobject-2.0.solibgmodule-2.0.solibgio-2.0.so )
  • CPython ( libpython.so )

step2、使用curl命令下载gobject-introspection源码包 (

curl -LO https://download.gnome.org/sources/gobject-introspection/1.63/gobject-introspection-1.63.1.tar.xz

step3、使用tar解压gobject-introspection源码包

tar vxf gobject-introspection-1.63.1.tar.xz

step4、进入gobject-introspection-1.63.1目录

cd gobject-introspection-1.63.1

step5、查看gobject-introspection-1.63.1目录的内容

6、使用meson配置编译参数

meson setup --prefix=$(pwd)/output --buildtype=release --backend=ninja build

step7、使用ninja编译、安装

ninja -C build && ninja -C build install
1.4、gobject-introspection中包含的命令
1.5、gobject-introspection中包含的头文件
1.6、gobject-introspection中包含的库文件
  • libgirepository-1.0.so