This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: C++, dlopen() and undefined __pure_virtual
- From: "Banibrata Dutta" <dutta at india dot hp dot com>
- To: "'Daniel Jacobowitz'" <drow at false dot org>
- Cc: "'H. J. Lu'" <hjl at lucon dot org>, <binutils at sources dot redhat dot com>
- Date: Fri, 23 Apr 2004 21:38:36 +0530
- Subject: RE: C++, dlopen() and undefined __pure_virtual
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
>