working in migration for cint to cling but I am getting linking errors for every class

r/src/TRFunction.o: In function `_GLOBAL__sub_I_TRFunction.cxx':
TRFunction.cxx:(.text.startup+0x58): undefined reference to `ROOT::GenerateInitInstance(ROOT::R::TRFunction const*)'
r/src/TRInterface.o: In function `ROOT::R::TRInterface::TRInterface(int, char const**, bool, bool, bool)':
TRInterface.cxx:(.text+0x29): undefined reference to `vtable for ROOT::R::TRInterface'
r/src/TRInterface.o: In function `_GLOBAL__sub_I_TRInterface.cxx':
TRInterface.cxx:(.text.startup+0x93): undefined reference to `ROOT::GenerateInitInstance(ROOT::R::TRInterface const*)'
r/src/TRObjectProxy.o: In function `ROOT::R::TRObjectProxy::TRObjectProxy(SEXPREC*)':
TRObjectProxy.cxx:(.text+0x14): undefined reference to `vtable for ROOT::R::TRObjectProxy'
r/src/TRObjectProxy.o: In function `_GLOBAL__sub_I_TRObjectProxy.cxx':
TRObjectProxy.cxx:(.text.startup+0x58): undefined reference to `ROOT::GenerateInitInstance(ROOT::R::TRObjectProxy const*)'
collect2: error: ld returned 1 exit status
make: *** [lib/libRInterface.so] Error 1