Search code examples
c++opencvgtk3glibfilechooser

How to fix error "GLib-GIO-ERROR**: No GSettings schemas are installed on the system"?


I have to create a one-file (.exe) program with InstallShield2015LimitedEdition that works with GTK3.4.2 and OpenCV 3.0.0 in Windows 7 x64. In this program the user can choose a directory from their computer. But when I invoke FileChooser (click on executable) I get this error:

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

enter image description here

and the program terminates.

I visited these pages:

Glib-GIO-ERROR when opening an file chooser dialog

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

How deal with FileChooser in GTK with static compilation

But I never understood exactly how to fix this error. It is related to org.gtk.Settings.FileChooser.gschema.xml file in this path: ...\share\glib-2.0\schemas.

Is it related to system environment variable? What things should I add to it?

enter image description here

Add to system variable or User variable? What is name and path?

For example. I added GSETTINGS_SCHEMA_DIR as variable name and E:\Works for Gov Project\Help\Source codes for GTK+\gtk+-bundle_3.4.2-20130513_win64\share\glib-2.0\schemas as path for both of system variable and User variable.

Is this correct?


Solution

  • I solved it:

    First: add GSETTINGS_SCHEMA_DIR as variable name and E:\Works for Gov Project\Help\Source codes for GTK+\gtk+-bundle_3.4.2-20130513_win64\share\glib-2.0\schemas as path for User variable.

    Then, in system variable ---> path add E:\Works for Gov Project\Help\Source codes for GTK+\gtk+-bundle_3.4.2-20130513_win64\share\glib-2.0\schemas with ; in first it, e.g. ;E:\Works for Gov Project\Help\Source codes for GTK+\gtk+-bundle_3.4.2-20130513_win64\share\glib-2.0\schemas