[gst-devel] where is library gst.h?

Fabian Hergenreder fabian_h at uol.com.ar
Mon Jul 11 11:55:34 CEST 2005

On Mon, 11 Jul 2005 02:34:18 -0400, Stefan Kost <ensonic at hora-obscura.de>  

> Hi Fabian,
> can you first make sure you can build a simple glib based app?
> --- glibtest.c ---
> #include "glib/glib.h"
> int main(int argc,char *argv) {
>    gpointer mem=g_malloc(100);
>    g_print("Hello\n");
>    g_free(mem);
> }
> gcc `pkg-config --cflags glib-2` glibtest.c -o glibtest `pkg-config  
> --libs glib-2`
> Stefan
> PS.: the above is untested ;)

So it is untested but... Should it be compile?

I did try it and I got this

fabian at jaguar:~/programas$ gcc `pkg-config --cflags glib-2.0` glibtest.c  
-o glibtest `pkg-config --libs glib-2.0`
glibtest.c:1:23: glib/glib.h: No such file or directory
glibtest.c: In function `main':
glibtest.c:4: error: `gpointer' undeclared (first use in this function)
glibtest.c:4: error: (Each undeclared identifier is reported only once
glibtest.c:4: error: for each function it appears in.)
glibtest.c:4: error: syntax error before "mem"
glibtest.c:6: error: `mem' undeclared (first use in this function)


fabian at jaguar:~/programas$ locate glib.h

so I tryed this on #include   #include "/usr/include/glib-2.0/glib.h"

And it work, so I think my problem is some undefined enviroment variable
but i dont know how to handle that

Am I in right way?


More information about the gstreamer-devel mailing list