Error: dictionary of class TTreeIndex not found

I’m attempting to compile ROOT using a makefile and I am able to successfully compile, but at runtime, this error pops up immediately followed by a segmentation violation.

This is the make file I am using:

[code]all: test

test: test.o reader.o
g++ -O3 -ffast-math -funroll-loops -ansi root-config --libs -o test test.o reader.o

test.o: test.cpp
g++ -O3 -ffast-math -funroll-loops -ansi root-config --cflags -c -o test.o test.cpp

MyDict.cxx: reader.h Linkdef.h
rootcint -f $@ -c -p $^

reader.o: MyDict.cxx
g++ -shared -o$@ root-config --ldflags root-config --cflags -I$(ROOTSYS)/include -fPIC $^[/code]

And my Linkdef.h is

[code]#ifdef CINT

#pragma link C++ nestedclasses;
#pragma link C++ class vector+;
#pragma link C++ class TClass+;
#pragma link C++ defined_in “reader.h”;

I cannot quite understand what I am doing wrong here. Do I need to include pragma statements with in my .h, .cc, and cpp files? If anybody has any pointers, it would be much appreciated.


Which version of ROOT are you using? This error message indicates that the system failed to automatically load the library libTreePlayer. You can work around the problem by explicitly linking it ( -lTreePlayer ). If you do not already, you may want to explicitly create a TApplication object to help properly bootstrap the system.