[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [Vala] Produced C files don't include headers they should include
- From: "Jaap A. Haitsma" <jaap haitsma org>
- To: "Sandino Flores Moreno" <tigrux gmail com>, vala-list gnome org
- Subject: Re: [Vala] Produced C files don't include headers they should include
- Date: Sun, 30 Mar 2008 00:09:33 +0100
I'm using version 0.1.6. So that's probably it
On Sun, Mar 30, 2008 at 12:06 AM, Sandino Flores Moreno
<tigrux gmail com> wrote:
> You could be using an old version.
>
>
> I compile to a C file:
> $ valac test.vala --thread --pkg gstreamer-0.10 --pkg gtk+-2.0
>
> And the generated C file has the headers:
>
> #include "test.h"
> #include <gdk/gdk.h>
> #include <gtk/gtk.h>
> #include <gst/gst.h>
>
> enum {
> FOO_FOO_DUMMY_PROPERTY
> };
> static gint foo_foo_main (char** args, int args_length1);
> static gpointer foo_foo_parent_class = NULL;
>
> static gint foo_foo_main (char** args, int args_length1) {
> gdk_threads_init ();
> gtk_init (&args_length1, &args);
> gst_init (&args_length1, &args);
> gtk_main ();
> return 0;
>
>
> }
>
>
> On Sat, Mar 29, 2008 at 4:58 PM, Jaap A. Haitsma <jaap haitsma org> wrote:
> > 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]