As you can see from the XML file, you place resources in the binary at specific resource paths: https://github.com/qiubit/gtk-snake/blob/master/snakeapp.gresource.xml In this case, the path for snake.ui is "/com/quibit/snakeapp/snake.ui" On Sun, Aug 23, 2015 at 8:49 PM, Igor Korot <ikorot01@xxxxxxxxx> wrote: > Jasper, > > On Sun, Aug 23, 2015 at 11:29 PM, Jasper St. Pierre > <jstpierre@xxxxxxxxxxx> wrote: >> Yes, you usually run glib-compile-resources. >> >> A GitHub code search for that turned up this, which seems simple >> enough: https://github.com/qiubit/gtk-snake > > So then this path becomes obsolete, since it is compiled into the binary? > Or not? > And how to properly format it? > > Thank you. > >> >> On Sun, Aug 23, 2015 at 8:19 PM, Igor Korot <ikorot01@xxxxxxxxx> wrote: >>> Jasper, >>> >>> On Sun, Aug 23, 2015 at 11:08 PM, Jasper St. Pierre >>> <jstpierre@xxxxxxxxxxx> wrote: >>>> Resource paths aren't filesystem paths -- the resource system compiles >>>> needed files and into the binary. >>> >>> Could you give me a link of how to do that. >>> Do I run something prior to compile my code with g++/gcc? Or I will >>> just add it to the Makefile? >>> >>> Thank you. >>> >>>> >>>> On Sun, Aug 23, 2015 at 7:49 PM, Igor Korot <ikorot01@xxxxxxxxx> wrote: >>>>> Hi, ALL, >>>>> On the page https://developer.gnome.org/gtk3/stable/GtkWidget.html, part >>>>> "Building composite widgets from template XML", the code says: >>>>> >>>>> [code] >>>>> gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), >>>>> "/com/example/ui/foowidget.ui"); >>>>> >>>>> [/code] >>>>> >>>>> This code assumes that the template is located at "/com/example/ui" and the file >>>>> is named "foowidget.ui". >>>>> >>>>> Now, what if I want to place it in the directory where the source code is and >>>>> I'd like to use "mytemplate.ui". >>>>> >>>>> Trying to run the code I am getting a run-time error "Template not found". >>>>> >>>>> Is there something I need to do to give a relative path? >>>>> >>>>> Thank you. >>>>> _______________________________________________ >>>>> gtk-list mailing list >>>>> gtk-list@xxxxxxxxx >>>>> https://mail.gnome.org/mailman/listinfo/gtk-list >>>> >>>> >>>> >>>> -- >>>> Jasper >> >> >> >> -- >> Jasper -- Jasper _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list