Re: [Vala] Produced C files don't include headers they should include



Thanks, but the warnings are still there if you compile to a C file.

valac test.vala -o test --thread --pkg gstreamer-0.10 --pkg gtk+-2.0

The resulting C file still doesn't include gstreamer or gtk

Jaap



On Sat, Mar 29, 2008 at 11:31 PM, Sandino Flores Moreno
<tigrux gmail com> wrote:
Your program has mistakes, the program fixed is:

 using GLib;
 using Gtk;
 using Gst;

 public class Foo.Foo : GLib.Object {


       static int main (string[] args) {

               Gdk.threads_init ();
               Gtk.init (ref args);
               Gst.init (ref args);

               Gtk.main ();
               return 0;
       }

 }

 And you should compile it with:

  $valac test.vala -o test --thread --pkg gstreamer-0.10 --pkg gtk+-2.0



 On Sat, Mar 29, 2008 at 2:12 PM, Jaap A. Haitsma <jaap haitsma org> wrote:
 > Hi,
 >
 >  When I write the following code
 >  -----
 >  using GLib;
 >
 >  public class Foo.Foo : Object {
 >
 >         static int main (string[] args) {
 >
 >                 Thread.init ();
 >                 Gdk.threads_init ();
 >
 >                 Gtk.init (ref args);
 >                 Gst.init (ref args);
 >
 >                 Gtk.main ();
 >                 return 0;
 >         }
 >
 >  }
 >  --------
 >
 >  and compile it to C code no #include statements for gtk, gstreamer and
 >  gdk are generated. Consequently compiling the C code results in
 >  warnings: implicit declerations for the gtk, gst and gdk functions I
 >  use. Am I doing something wrong?
 >
 >  Jaap
 >  _______________________________________________
 >  Vala-list mailing list
 >  Vala-list gnome org
 >  http://mail.gnome.org/mailman/listinfo/vala-list
 >




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