This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: C++, dlopen() and undefined __pure_virtual


Thank you Daniel and HJ, that solved my problem.

unwittingly newbie to this dlopen stuff,
regards,

bd.

> -----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:41 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:38:36PM +0530, Banibrata Dutta wrote:
> > 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 
> > g++ 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
> 
> -Wl,-soname,libxyz.so.  You can drop the explicit -lc references also.
> 
> > 
> > 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
> > > 
> > 
> > 
> 
> -- 
> Daniel Jacobowitz
> MontaVista Software                         Debian GNU/Linux Developer
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]