[ROOT] static linking GUIs

From: Caius Howcroft (howcroft@hep.phy.cam.ac.uk)
Date: Wed Apr 07 2004 - 15:57:55 MEST


Hi, 

I am trying to link a ROOT gui staticlly. (I'm using root 3.10.2 on 
RH7.2).

-I did a gmake static in the root build dir to get libRoot.a.
-Compiled my object files as normal.
-Then tried to link against the libRoot library.
   g++  -o myGui *.o   -L./  -lfontconfig -lRoot -ldl  -lcrypt

Note I had to include -lfontconfig/-ldl and -lcript to get the thing to 
link at all. 

It compiles okay, However, when I try run it I get this segv:

dlopen error: /usr/local/root_v3.10.02/lib/libGX11.so: undefined symbol: 
_ZNK7TObject7DoErrorEiPKcS1_Pc
Load Error: Failed to load Dynamic link library 
/usr/local/root_v3.10.02/lib/libGX11.so

 *** Break *** segmentation violation
 Generating stack trace...
 0x080c5960 in <unknown> from ./rcGui.static
 0x420156a4 in __libc_start_main + 0xe4 from /lib/tls/libc.so.6
 0x080b9a39 in dlopen + 0x41 from ./rcGui.static


Why is it trying to do a dlopen on libGX11.so when it was compiled against 
the libRoot.a? How do I resolve this issue?

Cheers
Caius

________________________________________
-           CAIUS HOWCROFT             -
-  +44 (0)1223 764 128      UK(office) -
========================================



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET