Re: Symbols not seen for second library

From: Damir Buskulic (buskulic@lapp.in2p3.fr)
Date: Fri Mar 24 2000 - 15:28:33 MET


Hello Masa,

Indeed, both libraries are shared libraries. I just link them with 

g++ -shared ... bla bla... -L/path_to_shared_libs -lLib1 -lLib2 ... -o
vega

where lib1 and lib2 are shared libraries that are build with cint
I just do not load them dynamically. If the solution is to make only one
dictionary, well, I'll bear with that.

Cheers

Damir

Masaharu Goto wrote:
> 
> Hello Damir,
> 
> Please use shared library.  If you link them statically, cint only
> calls one G__cpp_setup. If you really want to link them statically,
> you must combine them into one dictionary.
> Let me know if shared library is not acceptable to you.
> 
> Thank you
> Masaharu Goto
> 
> >
> >Hi,
> >
> >I'm building two shared libraries from plain C source as Masa explained
> >me a few months ago. That is, I pretend that everything is C++ and use
> >plain cint to build the dictionnary. Using rootcint does not work if I
> >want to build automatically the LinkDef.h file (it generates an empty
> >stub header/file).
> >Now, I build an executable that links statically these two libraries.
> >The problem is that only the symbols from the first linked library are
> >visible, i.e. can be used in the interpreter. As I understand it, the
> >function G__cpp_setup is called for the first one but not for the
> >second. If I swap the order of the libs on building the executable, the
> >symbols of the lib that was the second and is now the first are visible,
> >while the others are not anymore.
> >
> >Why is it so ? Is there a way to cure it ?
> >
> >Cheers
> >
> >Damir
> >--
> >=====================================================================
> >| Damir Buskulic                  | Universite de Savoie/LAPP       |
> >|                                 | Chemin de Bellevue, B.P. 110    |
> >| Tel : +33 (0)450091600          | F-74941 Annecy-le-Vieux Cedex   |
> >| e-mail: buskulic@lapp.in2p3.fr  | FRANCE                          |
> >=====================================================================
> >mailto:buskulic@lapp.in2p3.fr

-- 
=====================================================================
| Damir Buskulic                  | Universite de Savoie/LAPP       |
|                                 | Chemin de Bellevue, B.P. 110    |
| Tel : +33 (0)450091600          | F-74941 Annecy-le-Vieux Cedex   |
| e-mail: buskulic@lapp.in2p3.fr  | FRANCE                          |
=====================================================================
mailto:buskulic@lapp.in2p3.fr



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:22 MET