Problems compiling code with ROOT in Ubuntu 13.10

Hi all! I installed ROOT on my Ubuntu machine using Ubuntu Software Center. I’m talking about ROOT 5.34/09 on Xubuntu 13.10 with g++ 4.8.1. ROOT starts smoothly, but when I try to compile code, using root-config --cflags --glibs ld says that it can’t find -lGraf3d, -lPostscript and -lPhysics. If I try to run some macro in tutorials folder, like demos.C, ROOT returns this error:

Error: cannot call member function without object /media/sirio/e46d80e4-3ec1-47f6-9500-1d93242f216f/usr/share/doc/root/tutorials/demos.C:9:
  (compiled)   0 const char* TCint::GetCurrentMacroName();
Calling : TCint::GetCurrentMacroName();
Match rank: file     line  signature
*        1 (compiled)   0 const char* TCint::GetCurrentMacroName();
!!!Dictionary position not recovered because G__unloadfile() is used in a macro!!!
*** Interpreter error recovered ***

Does anyone know where is the problem?
If you need other infos tell me.
Thanks for all help
Sirio

I solved the problem. The package in Ubuntu Software center doesn’t install all packages required to compile programs, but only a part. I installed the metapackage via

sudo apt-get install root-system

and all went right.