Hello,
I would like to ask root experts for a help, since I didn’t find any up-to date documentation on Herwig++ pages.
I have an working library to analyse particles during the generation in Herwig++ (v2.6.3). However,
it crashes when I include root’s libraries.
My root (v5.34/10) seems to work fine in other ocasions, though.
I do:
I have DPIAnalysis.cc and DPIAnalysis.h and I make DPIAnalysis.so from it
using Makefile provided by Herwig++. This library is used in the generation. This works fine.
When I include e.q. TH1D.h. in DPIAnalysis.h and make DPIAnalysis.so using
Makefile (see below) - the making reports no error, but the Herwig++ then crushes:
Error: InternalAnalysis::DPIAnalysis: No such class found.
error message from dynamic loader:
/home/mira/local/Herwig++-2.6.3/lib/Herwig++/DPIAnalysis.so: cannot open shared object file: No such file or directory
/home/mira/local/ThePEG-1.8.3/lib/ThePEG/DPIAnalysis.so: cannot open shared object file: No such file or directory
./DPIAnalysis.so: undefined symbol: _ZN13TVersionCheckC1Ei
/home/mira/local/Herwig++-2.6.3/lib/Herwig++/DPIAnalysis.so: cannot open shared object file: No such file or directory
/home/mira/local/ThePEG-1.8.3/lib/ThePEG/DPIAnalysis.so: cannot open shared object file: No such file or directory
DPIAnalysis.so: undefined symbol: _ZN13TVersionCheckC1Ei
Herwig should see my library DPIAnalysis.so, it is in folder I run the generation,
I think the problem is that Herwig (and ThePEG = libraries for Herwig)
cant see libCore.so (I think that the _ZN13TVersionCheckC1Ei is in libCore.so)
Could you please help me to write the right Makefile ( - well, if it is fault of Makefile)
Now I have:
ROOTCFLAGS=`root-config --cflags`
ROOTGLIBS=`root-config --glibs`
ROOTLDFLAGS=`root-config --ldflags`
ROOTLIBS=`root-config --libs`
ROOTEVELIBS=`root-config --evelibs`
ROOT=$(ROOTCFLAGS) $(ROOTGLIBS) $(ROOTLDFLAGS) $(ROOTLIBS) $(ROOTEVELIBS)
CXX = g++
CXXFLAGS = -g -W -Wall -O3
CPPFLAGS = -I/home/mira/local/Herwig++-2.6.3/include -I/home/mira/local/ThePEG-1.8.3/include -I$(ROOTSYS)/include/root
LDFLAGS = -L$(ROOTSYS)/lib/root -lCore -lTree -lCint -lReflex -lCintex -lRIO -lHist
ALLCCFILES=$(shell echo *.cc)
all : $(ALLCCFILES:.cc=.so)
%.so : %.cc %.h
$(CXX) -shared -fPIC $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $(ROOT) $< -o $@
clean:
rm -f $(ALLCCFILES:.cc=.so)
Thank you very much in advance!
Mira