Re: [Vala] Compile failed on .gir file



On 14-04-10 20:04, Sam Wilson wrote:
On Wed, 2010-04-14 at 18:18 +0200, Geert Jordaens wrote:
/*
         valac -o G  --pkg Gee-1.0 G.vala
     */

     using GLib;
     using Gee;

     class ElementType : GLib.Object  {
          private uint _hash;
          private string _body;
          private string _name;
          public uint hash            { get { return _hash;} }
          public string body          { get { return _body;}
                                        set {
                                         _body = value;
                                          _hash = g_str_hash (_body);
                                        }
                                      }
          public string name          { get { return _name;}
                                        set {_name = value;}
                                      }
     }

     class PathType : GLib.Object  {
          public string path          { get; set; }
          public uint   elemnthash    { get; set; }
     }
compile with "valac -o G --pkg=gee-1.0 G.vala" (note the lower case g in
gee-1.0)

and change "g_str_hash" to just "str_hash"

and you should be good to go :)

Sam

Thanks Sam,

I was misguided by the filename :

/usr/share/gir-1.0/Gee-1.0.gir

Geert




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