Hi,
It did not work for me out of the box:g++ -pthread -std=c++11 -Wno-deprecated-declarations -m64 -I/home/pcanal/cint_working/rootcling/root/altc++11/include -fPIC -O2 -Wall -Wno-write-strings -shared -o myClass.so myClass.o EventDict.o -L/home/pcanal/cint_working/rootcling/root/altc++11/lib -lCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lMultiProc -pthread -lm -ldl -rdynamic -lm -lz -lutil -lnsl -lpthread -L.
/home/pcanal/bin/ld: error: myClass.o: requires unsupported dynamic reloc 11; recompile with -fPIC
/home/pcanal/bin/ld: error: myClass.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/home/pcanal/bin/ld: error: myClass.o: requires dynamic R_X86_64_PC32 reloc against '_ZN7myClass5ClassEv' which may overflow at runtime; recompile with -fPIC
/home/pcanal/bin/ld: error: myClass.o: requires dynamic R_X86_64_PC32 reloc against '_ZN7myClass5ClassEv' which may overflow at runtime; recompile with -fPIC
/home/pcanal/bin/ld: error: myClass.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/home/pcanal/bin/ld: error: myClass.o: requires dynamic R_X86_64_32 reloc against '__gxx_personality_v0' which may overflow at runtime; recompile with -fPIC
/home/pcanal/bin/ld: error: EventDict.o: requires dynamic R_X86_64_PC32 reloc against '_ZN8TStorage11ObjectAllocEmPv' which may overflow at runtime; recompile with -fPIC
/home/pcanal/bin/ld: error: EventDict.o: requires dynamic R_X86_64_PC32 reloc against '_ZdlPv' which may overflow at runtime; recompile with -fPIC
/home/pcanal/bin/ld: error: EventDict.o: requires unsupported dynamic reloc 11; recompile with -fPIC
/home/pcanal/bin/ld: error: EventDict.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/home/pcanal/bin/ld: error: EventDict.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
Once I added -fPIC ot the CXXFLAGS:CXXFLAGS += -fPIC -O2 -Wall -Wno-write-strings
It worked fine for both v6 and v5 on a Scientic Linux 6.7 machine.
Cheers,
Philippe.