MikeK's software notebook

MikeK's software notebook

What you will find

This used to be the place where I wrote stuff I was thinking about while working on the Mozilla project.

Maybe in the near future I'll start to update it again as I'm involved in a couple of new open-source projects - updates pending...

undefined reference to `gst_push_src_get_type'

GStreamerOprettet af Mike Kristoffersen 16 apr, 2009 09:36:20
I'm extending the GstPushSrc source for an integration of GStreamer with the Necko network library.

Creating an extension is not as trivial as inheritance in C++ as GStreamer uses the GObject object model, but anyway looking at the documentation and examples I made an attempt - hit compile, and got the above linker error.

Trying to investigate what went wrong I tried to do a project wide search for the function, it was found in the header file Gstpushsrc.h and no-where else, and just as the prototype "GType gst_push_src_get_type(void);"

Looking some more at the code I found that the "GST_BOILERPLATE" macro I was using generated the *_get_type function for my class and did a call to the base class' *_get_type function - and viola - there were a "GST_BOILERPLATE_FULL" function in Gstpushsrc.c also generating a *_get_type function.

I was now wondering - I have the prototype, and the implementation, why is the code then not linking? Well I knew that the file holding the implementation was not included in the build - so for a while I was considering adding it to my build, but it kind of felt like ceating and indeed it is not the way to do it.

The GstPushSrc is not part of the core GStreamer library, its part of the base plug-in library. The core library gstreamer-0.10 was allready added to configure.in in the root of the build directory, so this was probably a good place to add the base library too.

The remaining problem was then to find the name of the library... I'll spare you the story of my search - and note that it is: gstreamer-base-0.10, adding this to my configure.in file fixed the linking issues, and I'm now ready to continue :)


  • Kommentarer(1)

Fill in only if you are not real





Følgende XHTML-tags er tilladt: <b>, <br/>, <em>, <i>, <strong>, <u>. CSS og Javascript er ikke tilladt.
Oprettet af A 11 jul, 2014 09:28:19

Thanks, I'm trying to compile a simple source since two days and you you just give me the fix.