I have used Gtk in my program. When running by source code, it works normally.
module testGTK
using Gtk
function julia_main()
infilename = open_dialog_native("Select input file...", GtkNullContainer(), String[])
println(infilename)
end
julia_main()
end # module
However, after compiled with PackageCompiler and run the output program again, it showed the following message. (The Gtk package have been added to Project.toml
)
(testGTK.exe:28996): GLib-GObject-WARNING **: 19:53:13.685: cannot register existing type 'GtkWidget'
(testGTK.exe:28996): GLib-GObject-WARNING **: 19:53:13.686: cannot add class private field to invalid type '<invalid>'
(testGTK.exe:28996): GLib-GObject-WARNING **: 19:53:13.686: cannot add private field to invalid (non-instantiatable) type '<invalid>'
(testGTK.exe:28996): GLib-GObject-CRITICAL **: 19:53:13.686: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(testGTK.exe:28996): GLib-GObject-WARNING **: 19:53:13.687: cannot register existing type 'GtkBuildable'
(testGTK.exe:28996): GLib-GObject-CRITICAL **: 19:53:13.687: g_type_interface_add_prerequisite: assertion 'G_TYPE_IS_INTERFACE (interface_type)' failed
(testGTK.exe:28996): GLib-CRITICAL **: 19:53:13.687: g_once_init_leave: assertion 'result != 0' failed
(testGTK.exe:28996): GLib-GObject-CRITICAL **: 19:53:13.687: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(testGTK.exe:28996): GLib-GObject-CRITICAL **: 19:53:13.688: g_type_register_static: assertion 'parent_type > 0' failed
(testGTK.exe:28996): GLib-GObject-WARNING **: 19:53:13.688: cannot add private field to invalid (non-instantiatable) type '<invalid>'
Is there any way to solve this problem?