Hi, When doing a static link you need to provoke the loading of the dictionaries. You can do that either by explicitly requiring a symbol for each dictionary or by adding their .o file to the link line. I provide one example in the attachement. Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Caius Howcroft Sent: Wednesday, April 07, 2004 8:58 AM To: roottalk@pcroot.cern.ch Subject: [ROOT] static linking GUIs 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