Hi!
I am trying to make a minimal program just to test that compiling c++ and linking in ROOT works on my system (intel P4, SuSe linux 8.x) …which it doesn’t so far. I use the makefile below, and get the error also shown below. What is -lRoot, and why can’t the linker find it?
kindest regards,
Axel
linux:/opt/root/AXEL/examples # make
g++ -O histo-l.o -L/opt/root/lib -lRoot -lCint -lm -o histo-l
/usr/lib/gcc-lib/i486-suse-linux/3.2/…/…/…/…/i486-suse-linux/bin/ld: cannot find -lRoot
collect2: ld returned 1 exit status
make: *** [histo-l] Error 1
######################
Edit this part
######################
ROOTSYS = /opt/root
CXX = g++
LD = g++
#############################
Do NOT edit this part
#############################
CXXFLAGS = -O -w -qnoro -qnoroconst -qmaxmem=-1 -I$(ROOTSYS)/include
LDFLAGS = -g
ROOTLIBS = -L$(ROOTSYS)/lib -lRoot -lCint
LIBS = $(ROOTLIBS) -lm
LIBSALL = $(ROOTLIBS) -lXm -lXt -lX11 -lm -lPW -lcurses
histo-l: histo-l.o
$(LD) $(LDFLAGS) histo-l.o $(LIBS) -o histo-l
.C.o:
$(CXX) $(CXXFLAGS) -c $<