C++, dlopen() and undefined __pure_virtual
Banibrata Dutta
dutta@india.hp.com
Fri Apr 23 16:11:00 GMT 2004
Okay. My apolgies to you all including HJ.
I did try this immediately after getting HJ's mail,
but what i get is the following:
g++ -shared -soname libxyz.so -o libxyz.so -lc X.o -lc Y.o -lc Z.o -lc A.o
-lc B.o -lc C.o -lpthread -lm -ldl
g++: libxyz.so: No such file or directory
g++: unrecognized option `-soname'
make: *** [libxyz.so] Error 1
regards,
bdutta
> -----Original Message-----
> From: binutils-owner@sources.redhat.com
> [mailto:binutils-owner@sources.redhat.com] On Behalf Of
> Daniel Jacobowitz
> Sent: Friday, April 23, 2004 9:32 PM
> To: Banibrata Dutta
> Cc: 'H. J. Lu'; binutils@sources.redhat.com
> Subject: Re: C++, dlopen() and undefined __pure_virtual
>
>
> On Fri, Apr 23, 2004 at 09:30:58PM +0530, Banibrata Dutta wrote:
> > Hi H.J.:
> >
> > I am certainly running Linux (actually RH AS-2.1).
> > I think the "ld" would work fine because what i am doing is just
> > liking the objects in to create the shared library. Infact
> I remember
> > having tested the process of ".so" creation using ld
> previously. The
> > problem, I feel is elsewhere...
> >
> > Thanks for the quick response.
>
> No, HJ is right. You can not use ld to link shared libraries
> and expect things to work correctly. You're missing options
> and extra code that g++ would add to the shared library -
> including __pure_virtual.
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
>
More information about the Binutils
mailing list