Closed gummybears closed 4 years ago
What's GTK version you have installed? The samples works here with GTK version 3.24.21
.
Linux Mint 18.2, GTK version 3.18.9
The binding generator now rely on g_object_new_with_properties
to be able to construct objects passing the properties on constructor, however this function is only available since GLib version 2.54. So you need to upgrade your gtk3, :disappointed: , since I think there's no reason for a project like this to support old versions of GLib.
I thinks this deserves a mention on README.
So... what's your GLib version? Since this function comes from GObject library, that is usually in glib package.
I think my GLib version is too old.
$ dpkg -l gir1.2-glib-2.0
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=========================================-=========================-=========================-========================================================================================
ii gir1.2-glib-2.0:amd64 1.46.0-3ubuntu1 amd64 Introspection data for GLib, GObject, Gio and GModule
I guess this is the package for introspection of the glib package, not the glib package itself, since for sure your glib is 2.something.
Not sure how to determine the GLib version, but it is safe to say it is not the most recent.
What's your output of:
crystal eval 'require "gobject"; require_gobject("GLib"); puts "#{GLib::MAJOR_VERSION}.#{GLib::MINOR_VERSION}.#{GLib::MICRO_VERSION}"'
cat /etc/os-release
$ crystal eval 'require "gobject"; require_gobject("GLib"); puts "#{GLib::MAJOR_VERSION}.#{GLib::MINOR_VERSION}.#{GLib::MICRO_VERSION}"'
2.47.3
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial
So yeah, that's 4 years old :/ https://gitlab.gnome.org/GNOME/glib/-/tags/2.47.3
gobject_new_with_properties
was added with 2.54, which is 2 years old: https://gitlab.gnome.org/GNOME/glib/-/tags/2.54.0
The 18.04 Ubuntu LTS release ships 2.56: https://packages.ubuntu.com/bionic/libglib2.0-0
The 20.04 Ubuntu LTS release ships 2.64: https://packages.ubuntu.com/focal/libglib2.0-0
So I'm not sure it's worth to support such an old distro to be honest :/
No, you are right, I need to upgrade. Thanks for your time and help.
Not sure what is happening here, but most of the samples don't work anymore
shard.yml
Error when trying to run a sample