Re: gobject, loadable modules
- From: Tristan Van Berkom <tristan van berkom gmail com>
- To: "Morten O. Hansen" <morteoh chello no>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: gobject, loadable modules
- Date: Sun, 04 Jun 2006 19:51:53 -0400
Morten O. Hansen wrote:
Hello,
I'm trying to build a small program using loadable modules, so I have
this setup:
A class called Plugin (inherits from GTypeModule) which is responsible
for loading/unloading.
A class called TestPlugin (inherits from GObject)
A function in the so-file called plugin_init, which registers the type
with g_type_module_register_type.
in the main program I load the plugin, and runs plugin_init (from the
testplugin.so), and everything seems fine.
After this, GType g_type_from_name("TestPlugin") works fine, but
g_object_new(g_type_from_name("TestPlugin", NULL) causes a segfault (i
have traced it with gdb and it segfaults at the g_object_new function).
Please post the stack trace.
I compile the so-file with -shared, and everything i expose is
non-static and has G_MODULE_EXPORT.
Any obvious fault here? I can attach the code (very little code) if that
helps.
Please post the little code.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]