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 reader.cc
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”;
#endif[/code]
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.