WetGeek I'm going to go try that out now.
Unfortunately, eopkg told me libgtk-3-devel's already present. But I'm on the workstation now, so I can pass along some of the error information. That might help to narrow down the problem:
jerry@solus-4-1-budgie ~/projects/Vala/Introducing Vala Programming/ch2 $ valac helloGUIWorld.vala
helloGUIWorld.vala:6.5-6.7: error: The name `Gtk' does not exist in the context of `main'
Gtk.init(ref args);
^^^
helloGUIWorld.vala:9.22-9.24: error: The name `Gtk' does not exist in the context of `main'
var window = new Gtk.Window();
^^^
helloGUIWorld.vala:18.22-18.24: error: The name `Gtk' does not exist in the context of `main'
var button = new Gtk.Button.with_label("Click me!");
^^^
helloGUIWorld.vala:30.5-30.7: error: The name `Gtk' does not exist in the context of `main'
Gtk.main();
It's obviously unhappy with Gtk, but everything should be in place for it. I'd better include the little code example, to make it clear what the error messages are referring to:
// helloGUIWorld.vala
int main(string[] args)
{
// initializes the Gtk library with args passed from main()
Gtk.init(ref args);
// instantiates a top-level window
var window = new Gtk.Window();
window.title = "Hello GUI World";
window.border_width = 10;
window.window_position = Gtk.WindowPosition.CENTER;
window.set_default_size(400, 150);
window.destroy.connect(Gtk.main_quit);
// instantiates a Gtk push button and connects it
// to a handler that changes its text
var button = new Gtk.Button.with_label("Click me!");
button.clicked.connect( () => {
button.label = "Thank you!";
});
// adds the button to the window, already defined to
// occupy the center position in the window
window.add(button);
// everything remains invisible until told to show
window.show_all();
// create a main loop in the Gtk namespace
Gtk.main();
return 0;
}