Message: Geant4 and ROOT linking Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Geant4 and ROOT linking 

Forum: Installation and Configuration
Date: 10 Jul, 2008
From: Cristian Bungau <Cristian Bungau>

Hi,

I have added these lines to my makefile so that I can access ROOT from the Geant4 classes:

ifdef ROOTSYS ifdef G4UI_USE_ROOT CPPFLAGS += -DG4ANALYSIS_USE_ROOT $(shell $(ROOTSYS)/bin/root-config --cflags) ROOTLIBS = $(shell $(ROOTSYS)/bin/root-config --glibs) -lMinuit -lHtml

ROOTLIBS := $(filter-out -lNew,$(ROOTLIBS))
ROOTLIBS := $(filter-out -lThread,$(ROOTLIBS))
ROOTLIBS := $(filter-out -lpthread,$(ROOTLIBS))
LDLIBS += $(ROOTLIBS) endif endif

However I get these errors at the linking stage:

[cb67@dlccroft19 ADSR]$ make Using granular libraries ... Linking ADSR ...

/home/cb67/root/lib/libTree.so: undefined reference to `TThread::TThread(char const*, void* (*)(void*), void*, TThread::EPriority)'

/home/cb67/root/lib/libTree.so: undefined reference to `TThread::Exists()'

/home/cb67/root/lib/libTree.so: undefined reference to `TThread::SelfId()'

/home/cb67/root/lib/libTree.so: undefined reference to `TThread::Join(void**)'

/home/cb67/root/lib/libTree.so: undefined reference to `TThread::Run(void*)'

/home/cb67/root/lib/libTree.so: undefined reference to `TMutex::TMutex(bool)'

/home/cb67/root/lib/libTree.so: undefined reference to `TCondition::TCondition(TMutex*)'

/home/cb67/root/lib/libHtml.so: undefined reference to `TThread::TThread(void* (*)(void*), void*, TThread::EPriority)'

/home/cb67/root/lib/libTree.so: undefined reference to `TThread::SetCancelOn()'

/home/cb67/root/lib/libTree.so: undefined reference to `TCondition::Wait()'

/home/cb67/root/lib/libTree.so: undefined reference to `TThread::SetCancelDeferred()'

collect2: ld returned 1 exit status

make: *** [/home/cb67/geant4/bin/Linux-g++/ADSR] Error 1

The same errors I get if I try to use G4UIROOT, all the G4 classes in $G4INSTALL/source compile without any errors, while all the examples will give this error messages at the linking stage.

I would be very grateful for any suggestions. I am using Scientific Linux, geant4.9.1.p02 and root v5.20.

Thank you,

Cristian

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Geant4 and ROOT linking   (Ben Morgan - 10 Jul, 2008)
(_ Ok: Re: Geant4 and ROOT linking   (Cristian Bungau - 10 Jul, 2008)
 Add Message Add Message
to: "Geant4 and ROOT linking"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]