[gst-devel] using C++ shared library from gst plug in , error

Danilo Freire xharada at gmail.com
Sat Jul 19 01:27:24 CEST 2008


I think that, to access C++ code from C, it is necessary to create some
wrapper stuff in your C++ lib.
For instace, create a wrapper function do_stuff(X *x), something like this:

class X {
public:
    int number;

}

extern "C" int do_stuff()
{
   X *x = X::getSingleton();
   return x->number;
}
To handle a object in the C code, you can use a struct.

So, maybe, the problem is that in you shared library, it isnt used the
extern "C" declaration.

[]s

On Fri, Jul 18, 2008 at 7:47 PM, RamaVasu <ramavasu at hotmail.com> wrote:

> Hi,
>
> The gstreamer sample gst plugin is failing to use my C++ shared  shared
> library. The compilation , link and install is fine. But when the plugin is
> invoked with gst-inspect , it is failing with error undefined symbol
> "___gxx_personality_v0" in the linked shared library. It is because of
> plug-in is compiled with gcc and shared libary is compiled with gc++. ? What
> is the right way to fix it ?
>
> Regards,
> vasu.
>
> ------------------------------
> Keep your kids safer online with Windows Live Family Safety. Help protect
> your kids.<http://www.windowslive.com/family_safety/overview.html?ocid=TXT_TAGLM_WL_family_safety_072008>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>


-- 
Danilo Freire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20080718/dad76fc7/attachment.htm>


More information about the gstreamer-devel mailing list