Re: root on Linux: can't make trees?
Rene Brun (Rene.Brun@cern.ch)
Wed, 10 Jun 1998 08:16:34 +0200
stefan kluth wrote:
>
> Hi,
>
> I am learning to write root trees and I am stuck at a strange problem:
>
> persil:~/scratch> g++ -g -o treetest myclassCint.cc myclass.cc treetest.cc
> -I${ROOTSYS}/include -L${ROOTSYS}/lib -lNew -lBase -lCint -lRint -lClib
> -lCont -lFunc -lGraf -lGraf3d -lHist -lHtml -lMatrix -lMeta -lMinuit -lNet
> -lPostscript -lProof -lTree -lUnix -lZip -lGpad -lGui -lGX11 -lX3d
> -L/usr/X11R6/lib -lX11 -ldl -lXpm -lm
> treetest.cc: In function `int main(int, char **)':
> treetest.cc:46: warning: initialization to `int' from `float'
> /tmp/cce23616: In function `myclass type_info function':
> /home/skluth/scratch/myclass.cc:5: undefined reference to `TObject
> type_info function'
> /home/skluth/scratch/myclass.cc:5: undefined reference to `TObject
> type_info node'
>
> myclass.hh/cc defines the objects which are stored in a tree and treetest
> is a simple main() which generates the objects with random numbers. The
> same code works just fine on DEC unix 4 with DEC cxx 6. The line
> myclass.cc:5 contains "ClassImp(myclass)".
>
> I work on Linux persil 2.0.33 #7 Sat Apr 11 04:37:43 PDT 1998 i686 unknown
>
> with persil:~/scratch> g++ -v
> Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.90.29/specs
> gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
>
The version of Root for Linux-egcs has been compiled with the options
-fno-rtti -fno-exceptions
You should compile your code with the same options. The choice of
these options was suggested for compatibility between code compiled
with gcc and egcs compilers.
Remark for all compilers and machine types:
We suggest to compile your code with the compiler options (CXXFLAGS)
shown in the $ROOTSYS/test/Makefile.
Rene Brun