GLib-GIO-ERROR**: No GSettings schemas are installed on the system

前端 未结 2 1250
遇见更好的自我
遇见更好的自我 2020-12-06 18:03

Unfortunately, I am using Windows (Windows7 x64). With MinGW compiler in Code::Blocks and GTK+3.6.4. I compiled manually all the schemas from glib.


When I use

相关标签:
2条回答
  • 2020-12-06 18:28

    GSettings looks at the compiled schemas in the directories pointed by the $XDG_DATA_DIR environment variable. You can either use a launcher script that sets up the environment for you, or you can rely on the prefix, and install the gschemas.compiled files in the share/glib-2.0/schemas directory under the same prefix as your app binary is, e.g. if you have the following layout:

    YourApp/
      bin/
        YourApp.exe
      lib/
        libgtk3.dll
        libgobject.dll
        …
      share/
        …
        glib-2.0/
          schemas/
    

    Make sure that the gschemas.compiled file is under YourApp/share/glib-2.0/schemas, and that the org.gtk.Settings.FileChooser.gschema.xml is there as well.

    0 讨论(0)
  • 2020-12-06 18:28

    The problem is with the Glib schemas that apparently are not compiled on your system.

    You need the glib-compile-schemas and find the glib-2.0/schemas directory which is located in /usr/share/glib-2.0/schemas, I don't know if it will be found in the same path within MinGW, but I don't see why it wouldn't, so you must execute the following command1

    glib-compile-schemas /usr/share/glib-2.0/schemas/
    

    and that will create a file gschemas.compiled so you need write permission, then the error will go away.


    1Provided that the GLib schemas are installed in that directory.

    0 讨论(0)
提交回复
热议问题