* I had missed the main.C file from the example, thus the
first Makefile error.
* I had a messed up LD_LIBRARY_PATH (thanks Pasha for diagnosing).
* I was using the wrong load flags. I modified them based upon
$(ROOTSYS)/test/Makefile.linuxkcc plus -lRint and now it compiles
and links fine.
For completeness I will include my working Makefile for compiling
this example at the end.
Thanks.
Stephen
#---------------------------------------------------
ROOTLIBS = -L$(ROOTSYS)/lib -lNew -lBase -lCint -lClib -lCont -lFunc \
-lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet \
-lPostscript -lProof -lRint -lTree -lUnix -lZip
ROOTGLIBS = -lGpad -lGui -lGX11 -lX3d
# Linux - KCC
CXX = KCC
CXXFLAGS = -g +K0 -O0 --no_exceptions -fPIC -I$(ROOTSYS)/include
LD = KCC
LDFLAGS = -g --no_exceptions
SOFLAGS = --backend -shared
LIBS = $(ROOTLIBS) -lm -ldl
GLIBS = $(ROOTLIBS) $(ROOTGLIBS) -L/usr/X11R6/lib \
-lXpm -lX11 -lm -ldl
HDRS = MyClass.h
SRCS = main.C MyClass.C mydict.C
OBJS = main.o MyClass.o mydict.o
PROGRAM = myroot
all: $(PROGRAM)
$(PROGRAM): $(OBJS)
@echo "Linking $(PROGRAM) ..."
@$(LD) $(LDFLAGS) $(OBJS) $(GLIBS) -o $(PROGRAM)
@echo "done"
clean:; @rm -f $(OBJS) core
###
MyClass.o: MyClass.h
mydict.C: MyClass.h
@echo "Generating dictionary ..."
@rootcint mydict.C -c MyClass.h
#---------------------------------------------------