C 如何让GTK识别我创建的模板?

C 如何让GTK识别我创建的模板?,c,gtk,gtk3,C,Gtk,Gtk3,存储库位于此处: 编译程序进行得很顺利。我有一些未使用的变量,但这很好。在运行时,我看到以下警告,我运行的GUI与我提供的模板不同 (tllt-cp:28723): Gtk-CRITICAL **: 22:18:00.249: Unable to load resource for composite template for type 'TlltCpWindow': The resource at “/com/gitlab/tristan957/TlltCp/tllt-cp-window.ui

存储库位于此处:

编译程序进行得很顺利。我有一些未使用的变量,但这很好。在运行时,我看到以下警告,我运行的GUI与我提供的模板不同

(tllt-cp:28723): Gtk-CRITICAL **: 22:18:00.249: Unable to load resource for composite template for type 'TlltCpWindow': The resource at “/com/gitlab/tristan957/TlltCp/tllt-cp-window.ui” does not exist

(tllt-cp:28723): Gtk-CRITICAL **: 22:18:00.249: gtk_widget_class_bind_template_child_full: assertion 'widget_class->priv->template != NULL' failed

(tllt-cp:28723): Gtk-CRITICAL **: 22:18:00.249: gtk_widget_class_bind_template_child_full: assertion 'widget_class->priv->template != NULL' failed
Initializing object

(tllt-cp:28723): Gtk-CRITICAL **: 22:18:00.249: gtk_widget_init_template: assertion 'template != NULL' failed

我不确定我缺少了什么。

我需要添加以下函数

静态无效
tllt_cp_应用程序_启动(GAApplication*self)
{
g_resources_寄存器(tllt_cp_get_resource());
g_应用程序_设置_资源_基础_路径(self,“/com/gitlab/tristan957/TlltCp”);
G_应用程序_类(tllt_cp_应用程序_父类)->启动(自启动);
}

GResource*res=g\u resource\u load(“myfile.GResource”,NULL);g_资源_登记册(res)为我工作,但这让我走上了正确的方向,谢谢!