This is an error output on ROOT v.2.0
****************
g++ -g krecik.o -L/opt/root/lib -lNew -lBase -lCint -lClib -lCont -lFunc
-lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet -lPostscript
-lProof -lTree -lUnix -lZip -lg++ -lm -ldl -rdynamic -o krecik
/opt/root/lib/libCint.so: the `gets' function is dangerous and should not
be used.
ld: warning: libg++.so.27, needed by /opt/root/lib/libNew.so, may conflict
with libg++.so.2.7.2
ld: warning: libstdc++.so.27, needed by /opt/root/lib/libNew.so, may
conflict with libstdc++.so.2.7.2
ld: warning: libm.so.5, needed by /opt/root/lib/libNew.so, may conflict
with libm.so.6
/usr/i486-linux-libc5/lib/libm.so.5: warning: erfcl is not implemented and
will always fail
/usr/i486-linux-libc5/lib/libm.so.5: warning: erfl is not implemented and
will always fail
/usr/i486-linux-libc5/lib/libm.so.5: undefined reference to `__getfpucw'
make: *** [krecik] Error 1
It's krecik.cxx
*********************
#include <TROOT.h>
#include <TFile.h>
#include <TTree.h>
Int_t Error;
main(int argc,char **argv)
{
TROOT simple("simple","Test of TTree");
TFile hfile("mar.root","RECREATE","ROOT with all info on muons");
typedef struct { Float_t x,y,z; } POINT;
POINT begin_vertex;
POINT end_vertex;
POINT momentum;
Int_t mother;
Float_t p;
Float_t pt;
Float_t track_lenght;
TTree *muontree=new TTree("muontree","Data for all muons");
muontree->Branch("Momentum",&momentum,"Px:Py:Pz");
muontree->Branch("Begin_Vertex",&begin_vertex,"Xvert:Yvert:Zvert");
muontree->Branch("End_Vertex",&end_vertex,"Xvert2:Yvert2:Zvert2");
muontree->Branch("Tracklenght",&track_lenght,"Tracklenght");
muontree->Branch("P",&p,"P");
muontree->Branch("Pt",&pt,"Pt");
muontree->Branch("Mother",&mother,"Mother/I");
muontree->Print();
muontree->Write();
return 0;
}
**************************
and my Makefile
**************************
ObjSuf = o
SrcSuf = cxx
ExeSuf =
DllSuf = so
KRECIKLIB = $(KRECIKO)
OutPutOpt = -o
ROOTLIBS = -L$(ROOTSYS)/lib -lNew -lBase -lCint -lClib -lCont -lFunc \
-lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet \
-lPostscript -lProof -lTree -lUnix -lZip
ROOTGLIBS = -lGpad -lGui -lGX11 -lX3d
# Linux
CXX = g++
CXXFLAGS = -O -fPIC -I$(ROOTSYS)/include
LD = g++
LDFLAGS = -g
SOFLAGS = -Wl,-soname,libEvent.so -shared
LIBS = $(ROOTLIBS) -lg++ -lm -ldl -rdynamic
GLIBS = $(ROOTLIBS) $(ROOTGLIBS) -L/usr/X11R6/lib \
-lXpm -lX11 -lg++ -lm -ldl -rdynamic
#------------------------------------------------------------------------------
KRECIKO = krecik.$(ObjSuf)
KRECIKS = krecik.$(SrcSuf)
KRECIK = krecik$(ExeSuf)
OBJS = $(KRECIKO)
PROGRAMS = $(KRECIK)
all: $(PROGRAMS)
$(KRECIK): $(KRECIKO)
$(LD) $(LDFLAGS) $(KRECIKO) $(LIBS) $(OutPutOpt) $(KRECIK)
@echo "$(KRECIK) done"
clean:
@rm -f $(OBJS) core
.SUFFIXES: .$(SrcSuf)
###
.$(SrcSuf).$(ObjSuf):
$(CXX) $(CXXFLAGS) -c $<
*************************
-- Tadeusz Pytlos mailto:pytlos@fizwe5.fic.uni.lodz.pl Lodz, Poland