glib version
#include <stdio.h> #include <glib.h> int main(int agrc, char **argv) { g_printf("%d:%d:%d\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);//当前版本 g_printf("%s\n",glib_check_version (2,24,0));//使用旧的版本check g_printf("%s\n",glib_check_version (2,24,2));//使用新的版本check g_printf("%d\n",glib_binary_age); //不知 g_printf("%d\n",glib_interface_age);//不知 return 0; } 编译 gcc -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0 -o hello hello.c 结果 root@ubuntu:/home/naviwork/glib# ./hello 2:24:1 (null) GLib version too old (micro mismatch) 2401 1 |
|