Pages

Showing posts with label vala. Show all posts
Showing posts with label vala. Show all posts

Saturday, November 19, 2022

Fedora 37 : Vala development in Fedora 37.

Yesterday I tested the Vala programming language on the Fedora 37 linux distribution. The basic idea was that most linux distribution environments use the GTK+ toolkit that Gnome developed. Development with GTK+ can be done with various programming languages: c, python, rust... The main reason why I tested the implementation of the Vala programming language was that Gnome developed it.
For the installation, I used the DNF utility with the following commands to install the packages necessary for the operation of the development in Vala
$sudo dnf groupinstall "Development Tools" "Development Libraries"
$ sudo dnf install vala
The first command installs the tools that are essential to perform tasks such as installing packages from source code.
The second command only installs the Vala package.
To test the written program we will need to use the Valac compiler and then run it as a simple executable in Linux.
$valac --pkg gtk+-3.0 test.vala 
$ ./test

(test:6198): GLib-GObject-CRITICAL **: 14:34:11.454: g_value_set_boxed: assertion 'G_VALUE_HOLDS_BOXED (value)' failed 
The error is about the implementation of Vala in Fedora, I don't have an answer of this but in other Linux distributions this is not show.
If you want to use WebKit2GTK+ Extensions then you need to compile it.
valac test.vala  --pkg gtk+-3.0 --pkg webkit2gtk-4.0
Is a more easy way to developm application but you need to know well how to deal with GTK and GObject structure.