Re: [Vala] no Gtk when it is installed ??



Tobiasz Kowalczyk wrote:

2008/1/23, Vlad <b100dian gmail com>:
Tobiasz wrote:
> Hello!
>
> I' ve recently tried out Vala on my Ubuntu 7.10 Gutsy Gibbon and I've
> encountered a problem at the very beginning. I've copied and pasted the
>
>
>   *"Another Vala GTK+ Example using GtkTreeView and GtkBuilder API"*
>
> from the  samples located on http://live.gnome.org/Vala/GTKSample and
> after execution of valac test.vala (test is the file with the example) I
> receive an error:
>
> /home/tobiasz/test.vala:1.7-1.9: error: The namespace name `Gtk' could
> not be found> /home/tobiasz/test.vala:7.9-7.17: error: The type name `FileModel' could
> not be found
> /home/tobiasz/test.vala:8.9-8.13: error: The type name `Label' could not
> be found
> /home/tobiasz/test.vala: 9.9-9.12: error: The type name `VBox' could not
> be found
> /home/tobiasz/test.vala:10.9-10.13: error: The type name `Entry' could
> not be found
> ... etc.
>
> I guess it all concerns Gtk library but I've checked it twice and I've
> got Gtk library installed with all dev packages and so on...
>
>
Seems like you need to run
$ valac --pkg gtk+-2.0 test.vala

This is the name of the package as mentioned in it's pkg-config file,
and enables valac to lookup it's VAPI file and even pass the --cflags
--libs to gcc

--
Vlad http://blad.wordpress.com


Thank you, all messages concerning Gtk have disappeared, however there are 3 errors left:

/home/tobiasz/test.vala:7.9-7.17: error: The type name `FileModel' could not be found
/home/tobiasz/test.vala:78.17-78.24: error: The type name `FileInfo' could not be found
/home/tobiasz/test.vala: 78.17-78.24 : error: The type name `FileInfo' could not be found
Compilation failed: 3 error(s), 0 warning(s)

Any ideas how to cope with them?? I would appreciate further help,these are my first steps with Vala.

Tobiasz
Hmm.. they don't seem to be referenced in that source - could you paste your test.vala here?

Vlad


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]