Re: [Vala] How to setup vala with gtk



You have to set environment variable PKG_CONFIG_PATH to point to where .pc
files resides. Then tell valac what packages you want to use with --pkg=.
eg.

valac Gtk-01 Gtk-01.vala --pkg=gtk+-2.0

Derek Dai


On Sat, Apr 21, 2012 at 8:00 PM, <vala-list-request gnome org> wrote:

Send vala-list mailing list submissions to
       vala-list gnome org

To subscribe or unsubscribe via the World Wide Web, visit
       http://mail.gnome.org/mailman/listinfo/vala-list
or, via email, send a message with subject or body 'help' to
       vala-list-request gnome org

You can reach the person managing the list at
       vala-list-owner gnome org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of vala-list digest..."


Today's Topics:

  1. How to setup vala with gtk (Vernon)
  2. Re: Is val(a)ide a gui Builder? (pancake)


----------------------------------------------------------------------

Message: 1
Date: Wed, 18 Apr 2012 03:16:51 +0000 (UTC)
From: Vernon <vmars316 live com >
To: vala-list gnome org
Subject: [Vala] How to setup vala with gtk
Message-ID: <loom 20120418T050907-377 post gmane org>
Content-Type: text/plain; charset=us-ascii

Hello,
Windows7:
I just downloaded "vala-0.12.0.exe vala 0.12.0  for Windows".
When i compile with "valac -o Gtk-01 Gtk-01.vala"
vala can't find gtk.
error: namespace name "gtk" cannot be found.
How can i set up vala & gtk
so that they work together?
I also, want a Gui Builder in the mix.
Is Glade a good choice?
Thanks for your help...Vernon

Here is my source example code:
using Gtk;

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

   var window = new Window ();
   window.title = "First GTK+ Program";
   window.border_width = 10;
   window.window_position = WindowPosition.CENTER;
   window.set_default_size (350, 70);
   window.destroy.connect (Gtk.main_quit);

   var button = new Button.with_label ("Click me!");
   button.clicked.connect (() => {
       button.label = "Thank you";
   });

   window.add (button);
   window.show_all ();

   Gtk.main ();
   return 0;
}



------------------------------

Message: 2
Date: Fri, 20 Apr 2012 23:54:38 +0200
From: pancake <pancake youterm com>
To: Eric Gregory <eric yorba org>
Cc: "live\(vmars316\)" <vmars316 live com>,     "vala-list gnome org"
       <vala-list gnome org>
Subject: Re: [Vala] Is val(a)ide a gui Builder?
Message-ID: <900CDC8C-18B4-4F64-B74E-0BBA949D0CED youterm com>
Content-Type: text/plain;       charset=us-ascii

if you prefer container text descriptions and compiled code for gtk. check
gtkon syntax from gtkaml project. genie is not yet supported, but you can
inline vala

On Apr 17, 2012, at 23:32, Eric Gregory <eric yorba org> wrote:

On Tue, Apr 17, 2012 at 2:21 PM, live(vmars316) <vmars316 live com>
wrote:

If not can you aim me at one?


You want Glade:
http://glade.gnome.org/

It's not Vala-specific at all -- you can create Gtk+ interfaces, save
them
to an XML file, and load them into programs with Gtk.Builder.

- Eric
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list


------------------------------

_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list


End of vala-list Digest, Vol 53, Issue 16
*****************************************



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