Hi
I wrote a simple C code with gstreamer libs( gstreamer example code manual ref )
On my ubuntu linux, the gstreamer headers are inside /usr/include/gstreamer-0.10/gst
Inside my C code I wrote:
#include <stdlib.h> #include <gstreamer-0.10/gst/gst.h>
....
....
I have this error: there are unresolved includes inside <gstreamer-0.10/gst/gst.h>
inside gstreamer-0.10/gst/gst.h I find: #include <glib.h> #include <gst/glib-compat.h> #include <gst/gstenumtypes.h> #include <gst/gstversion.h> #include <gst/gstbin.h> #include <gst/gstbuffer.h> #include <gst/gstbufferlist.h> #include <gst/gstcaps.h>
....
....
But On my ubuntu I have
Assuming you're using gcc, you can specify extra include directories with -I<path>, e.g:
gcc -I/usr/include/gstreamer-0.10
tells the compiler to look in /usr/include/gstreamer-0.10.
You should probably include -I/usr/include/gstreamer-0.10 and -I/usr/include/glib-2.0, and then #include <gst/gst.h> in your source file. That way, you can use new versions of the headers by just changing the -I flags on your command line.
These are linker errors - you need to link with the pre-compiled gstreamer library. This means you need to find where that library is and, if it's not in a standard directory like /lib/ or /usr/lib/, pass that as an -L option to specify the library directory to gcc, much like you did with -I (uppercase 'i'), and then you need to pass an -l (lowercase 'L') option, e.g. the following:
gcc -L/usr/lib/gstreamer-0.10/ -lgstreamer
Will tell gcc to look for library files in /usr/lib/gstreamer-0.10/, and will look for libgstreamer.so.
I don't know if you'll want to use -lgstreamer, you'll have to find out from their documentation.