无法在 Mac OSX 上使用 gtk3 FileChooser?

标签 c macos gtk glib

我将使用 gtk+3.0 构建的程序从 Linux 迁移到 Mac OS X(10.6.8)。 我编译的程序没有错误。
但是,在我启动程序并选择打开文件后,终端显示以下消息。

GLib-GIO-CRITICAL **:未安装设置架构“org.gtk.Settings.FileChooser”

然后,程序以段错误结束。

如何解决? 感谢您的帮助。

最佳答案

看来您不是遇到此问题的人,并且它 also happens on Windows on MinGW 。幸运的是,那个人给出了解决方案:

The thing, as it seems as I was running the test-widget example (that I built with gtksourceview-3.0.0 using MSVC), was that I need to compile the org.gtk.Settings.FileChooser.gschema.xml file (from GTK+-3.x, under $(srcroot)/gtk) with the glib-compile-schemas utility that is from GLib, which will generate gschemas.compiled in the same folder.

After that, place that gschemas.compiled file in the this folder: $(parent_folder_of_the_gtk3_dll)\share\glib-2.0\schemas and one will be set to use the gtkfilechooser without the puzzling

[GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed] error.

I will add to my GLib project files to compile the glib-compile-schemas utility and add to my GTK+-3.x project files to compile the the org.gtk.Settings.FileChooser.gschema.xml shortly.

关于无法在 Mac OSX 上使用 gtk3 FileChooser?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9678301/

相关文章:

c - 读取(套接字)会阻塞直到缓冲区已满吗?

c++ - 什么决定了 Xcode 项目的 developmentRegion 设置?

windows - 在 ubuntu 服务器上使用 git

gtk - 如何在 GTK 和 Python 中获取小部件的背景颜色?

c - "->"在C编程、Gtk+编程中代表什么?

c - Readline:在 SIGINT 上获取新提示

c - 从C语言的文本文件中读取格式化数据

swift - 如何使用 Swift 3 中的 sampleBuffer、captureOutput 将视频保存到文件?

gtk - 如何将自定义gtkmm小部件添加到林间空地?

c - 段错误 : how to know in which line code or function that caused this segfault