Philippe, I guess you are using a 64-bit version x86_64, while (s)he uses a 32-bit version i686.
That really makes a difference -> on some computer architectures, including the popular x86-32, it is actually possible to link non-PIC objects into a shared library, for the cost of some overhead in program’s loading time and its RAM usage, as more “relocations” have to be done (this might not work on amd64 / x86-64, where you may get fairly cryptic errors about invalid and/or “does not fit” relocations and/or missing symbols).
Note also that, in all previous posts in this thread, you can find “-fPIC” in all relevant places (while the TClass problem persisted).
mgv4ce, please remove two lines from your makefile (both variables will properly be defined by the included “$(ROOTSYS)/etc/Makefile.arch” and then also the missing “-fPIC” will automatically be there):
CXX = g++
CXXFLAGS := $(ROOTCFLAGS)