Re: How to use a Share Library

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Jun 21 1999 - 08:56:22 MEST


Olivier,
When you create a shared library, this library can contain
unsatisfied references to other symbols in other shared libs.
However, when you load the shared lib, you must load the shared libs
in the right order to avoid the kind of messages you are reporting.
It could also be that you forgot to implement some member
functions declared in your class header.
Check that you really declared/implemented:
  the default constructor
  the virtual destructor
  If you have a ClassDef in the header, you must have ClassImp

If you do not find which function is unsatisfied, I suggest
you create a small main program where you declare a statement like
  MyClass  m;
The loader will tell you which function is missing

Rene Brun

Olivier Meplan wrote:
> 
> Hi Rooters!
> 
> I have a pb with share library ; I have first create a library lib1.so
> which  contain class descpription. Now I want to use classes defined in
> this share lib in an other prg but I don't succeed...
> The main reason is certainly that I don't understand the Makefile I used
> to compile and so I am doing something wrong (up to now I just used the
> template makefile for a Digital Unix). The result of my compilation is
> the following:
> ld:
> Unresolved:
> __vtbl_8Detector  Make sure that the first noninlined virtual member
> function of 'Detector' is defined.
> __vtbl_11ManipHeader  Make sure that the first noninlined virtual member
> function of 'ManipHeader' is defined.
> __vtbl_5Manip  Make sure that the first noninlined virtual member
> function of 'Manip' is defined.
> __vtbl_11EventHeader  Make sure that the first noninlined virtual member
> function of 'EventHeader' is defined.
> __vtbl_5Event  Make sure that the first noninlined virtual member
> function of 'Event' is defined.
> __vtbl_11EventDouble  Make sure that the first noninlined virtual member
> function of 'EventDouble' is defined.
> *** Exit 1
> 
> where Detector, ... are the different classes that are define in the
> lib1.so
> 
> Is there someone to help me?
> Thanks
> Olivier
> 
> --
> =========================================================
> |Olivier Meplan             |E-mail:meplan@isn.in2p3.fr
> |                           |
> |ISN, 53 avenue des Martyrs |  Tel +33(0)4 76-28-41-90
> |F-38026 GRENOBLE cedex     |  Fax +33(0)4 76-28-40-04
> =========================================================



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:34 MET