GLib-GObject-WARNING **: Two different plugins tried to register

使用 Ubuntu vivid 的 glib-2.44.1 的程序总是打印类似这样的警告:

GLib-GObject-WARNING **: Two different plugins tried to register

GLib-GIO-WARNING **: Tried to register an extension of the type (null) to extension point


通过遍查 glib 代码,发现 gio/giomodule.c 文件的 _g_io_modules_ensure_loaded 函数里有这么一句:

      /* Hard-coded fallback directory for pre-multiarch compatibility */
      g_io_modules_scan_all_in_directory ("/usr/lib/gio/modules");


将这一句注释掉,重新编译,就不再出现上述警告了。

你可能感兴趣的:(Linux,编译参数)