Re: [Vala] [newbie] one more error: vala on win32



2009/8/25 ecir hana <ecir hana gmail com>:
Hello,

please, I have one more question. Previously, I thought I got the
errors because I didn't have the needed binary libraries (?). So I
downloaded both gtksourceview-2.6.2.zip and
gtksourceview-dev-2.6.2.zip [1], and extracted into Vala/MinGW
installation directory.

However, when I try to compile a simple program [2], I get this error:

valac -X -mwindows --pkg gtk+-2.0 --pkg gtksourceview-2.0 edit.vala

edit.vala.c:5:41: gtksourceview/gtksourceview.h: No such file or directory
edit.vala.c: In function `_main':
edit.vala.c:25: error: `GtkSourceView' undeclared (first use in this function)
edit.vala.c:25: error: (Each undeclared identifier is reported only once
edit.vala.c:25: error: for each function it appears in.)
edit.vala.c:25: error: `view' undeclared (first use in this function)
edit.vala.c:32: error: syntax errorbefore ')' token
error: cc exited with status 1
Compilation failed: 1 error(s), 0 warning(s)

Why's that? The "gtksourceview/gtksourceview.h" is there, I don't
understand. I try to read the tutorial and it mentions this "VAPI
file" and "an optional dependency file" - could this be the reason? If
so, where can I get them? Or do I have to somehow recompile the
GtkSourceView sources because it is not possible to use the
precompiled binaries?

Thanks in advance...

[1] http://ftp.gnome.org/pub/gnome/binaries/win32/gtksourceview/2.6/

[2] edit.vala:
using Gtk;

static int main (string[] args) {
   Gtk.init (ref args);

   var window = new Window (WindowType.TOPLEVEL);
   window.title = "text editor";
   window.set_default_size (400, 300);
   window.position = WindowPosition.CENTER;
   window.destroy.connect (Gtk.main_quit);

       var view = new SourceView ();
       window.add(view);

   window.show_all ();

   Gtk.main ();
   return 0;
}
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list


Hi.
Where exactly is gtksourceview.h?
make sure it is where the compiler expects it (whatever windows calls
"/usr/include"), also make sure "pkg-config.exe --cflags
gtksourceview-2.0" returns sane values, -I flags pointing to your
gtksourceview.h include dir.



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