请教linux编程

在linux下安装root软件(一种可画图用的)后,修改.bashrc(用b shell),
ROOTSYS=/usr/local/root
PATH=$ROOTSYS/bin:/usr/local/netscape/:/usr/local/sbin:/sbinPATH
LD_LIBRARY_PATH=$ROOTSYS/libLD_LIBRARY_PATH
DYLD_LIBRARY_PATH=$ROOTSYS/libDYLD_LIBRARY_PATH
export PATH ROOTSYS PGPLOT_DIR LD_LIBRARY_PATH DYLD_LIBRARY_PATH
root软件可用,但不能引用root的库函数。
例如:编个程序要用到root的库函数
设置Makefile文件:
dtime : dtime.o
        $(LD) $(OutPutOpt) $@ $(LIBS) $(GLIBS)  $^
其中
LD = g++ ;OutPutOpt = -o ;LIBS  = $(ROOTLIBS) $(SYSLIBS);
GLIBS  = $(ROOTGLIBS) $(SYSLIBS);
ROOTLIBS     := $(shell root-config --libs);
ROOTGLIBS    := $(shell root-config --glibs);
make后,出错:
dtime.o(.text+0xc6d): In function `main':
: undefined reference to `TApplication::~TApplication [in-charge]()'
collect2: ld returned 1 exit status
make: *** [dtime] Error 1
(TApplication是root的库函数)
请问要怎样改正?谢谢!