Re: Re: call a function in a module



Thanks a lot,
 i put -export-dynamic and now i can call functions

remy


> While it's kind of hard to say exactly what the problem is without 
> seeing more code in context, one thing to make sure you do when writing 
> applications with plugins is to use the -rdynamic compiler flag when 
> building the executable. This flag ensures that symbols are exported. By 
> default, symbols are only exported from shared libraries.
> 
> Alan.
> 
> 
> r jimenez voila fr wrote:
> 
> >Hi,
> >i am working on a program which use load module.
> >In each module, i need to call functions from the program core's.
> >
> >I succed in getting a variable in a class which belong to the core, but when i call a function, i get a segmentation fault.
> >
> >I get the pointer via a function init when i search all the modules :
> >
> >GetModule get_module;
> >get_module = (GetModule) func;
> >IPlugin* ptr_plugin = get_module();
> >ptr_plugin->init(auth_plugs);
> >
> >
> >In my module, i can get a variable from the class auth via the pointer auth_plugs :
> >(*auth_module)->var1
> >
> >but the function following cannot be called :
> >Glib::ustring Auth::test(){
> >	return var1;
> >}
> >
> >here :
> >(*auth_module)->test();
> >
> >The segfault occurs when i call the function
> >
> >
> >I checked with ddd, the adresses of the pointers are good.
> >
> >Can anybody help me ?
> >
> >
> >remy
> >------------------------------------------
> >
> >Faites un voeu et puis Voila ! www.voila.fr 
> >
> >
> >
> >_______________________________________________
> >gtkmm-list mailing list
> >gtkmm-list gnome org
> >http://mail.gnome.org/mailman/listinfo/gtkmm-list
> >  
> >
> 
> 
> 
------------------------------------------

Faites un voeu et puis Voila ! www.voila.fr 






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]