Problem about the installation

I have installed a latest version of root in my local directory.
It works well only at interactive mode. When I try to compile a very simple program and link the root libary, it generates a lots error message, like

*/lib/root/libTree.so: undefined reference to TBufferFile::InitMap()' */lib/root/libHist.so: undefined reference toTMath::Prob(double, int)’
/lib/root/libTree.so: undefined reference to TBufferFile::GetLastProcessID(TRefTable) const’
*/lib/root/libTree.so: undefined reference to TBufferFile::WriteArray(float const*, int)' */lib/root/libHist.so: undefined reference toTMath::DiLog(double)’
/lib/root/libHist.so: undefined reference to TMath::VavilovI(double, double, double)' */lib/root/libTree.so: undefined reference toTStreamerInfo::ReadBufferSTL(TBuffer&, TVirtualCollectionProxy, int, int, int)’
/lib/root/libTree.so: undefined reference to `TBufferFile::ReadArray(long&)’

Could anybody tell me why this happened? any wrong environment variable or config problem?

You forgot to link with some essential libs, eg libRIO, libMathCore.
To see the list of required libs (default), do
root-config --libs

Rene

[quote=“brun”]You forgot to link with some essential libs, eg libRIO, libMathCore.
To see the list of required libs (default), do
root-config --libs

Rene[/quote]

Thanks a lot!