Re: [gtkmm] dynamic loading



Thanks for your answer.

Sorry, I would say that dlopen() and g_module*() are written in C.
I need to use C++ code, but I thought that functions declared with extern
"C" must be written in C. I didn't know that they could be written in C++,
so it's ok for me now.

I also found a lot of info I need here:
http://www.tldp.org/HOWTO/mini/C++-dlopen/

Xavier



----- Original Message -----
From: Paulo Pinto <paulo pinto altitude com>
To: xavier dufresne <xdufresne gmx fr>
Sent: Tuesday, October 08, 2002 6:19 PM
Subject: Re: [gtkmm] dynamic loading


> Why do you say they are written in C ?
> All I can see in  module.cc is a C++
> function using the iostreams. Besides
> the file extension is .cc so gcc will
> compile it as C++ code.
>
> For me it seems that the error is related
> with name mangling.
>
> If you really want to use C code than use
> should use it in .c files.
>
> If want to use C++ instead, you have to
> resort to extern "C" declaration.
>
> --
> Paulo Pinto
>
> ----- Original Message -----
> From: "xavier dufresne" <xdufresne gmx fr>
> To: "gtkmm-list" <gtkmm-list gnome org>
> Sent: Tuesday, October 08, 2002 8:22 PM
> Subject: [gtkmm] dynamic loading
>
>
> > I need to use dynamic loading. I didn't find anything in gtkmm lib, so I
> > tried to use g_module.
> > It failed so I tried dlopen(), and it produced the same error:
> > g_module_symbol() and dlsym() can't resolve the given symbol.
> > Maybe symbols are hidden by C++ mangling. This functions are written in
C
> so
> > they don't resolve mangling. Is it right ?
> >
> > Is there a way to manage dynamic loading with gtkmm ?
> > If not, how can I do ? Do you know a C++ library which manage dynamic
> > loading ?
> >
> > I am using GNU/Linux and g++ 2.96.
> >
> > Thancks
> >
> > Xavier
> >
> > Joined file: The program I used to test dlsym() and g_module_symbol().
> >
> >
>
>




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