Hi,
Thanks for your answer!
I don’t see how I can use different compilers when I want to use the root classes
inside the c programs. I will try however the updating option. So you suggest that
in C++ there is no need to use malloc at all? Or one needs to cast the pointer
that malloc returns using the correct type (e.g. float* )? Is this why it brakes?
The errors I get are too many to post them but here are the first few lines.
I should also probably mention the following two points that
-
I have not compiled root from source but I
used the binary:
AMD64 Linux for Redhat RHEL 4 (SLC4) and gcc 3.4, version 5.20/00
and I am using an
AMD Opteron™ Processor 146 -
I am including the root .h files with this option in the Makefile:
-I$(shell root-config --cflags)
Is this sufficient?
So when using CC=gcc I get
In file included from /home/users/step0ut/root/include/Rtypes.h:30,
from /home/users/step0ut/root/include/TObject.h:31,
from /home/users/step0ut/root/include/TNamed.h:26,
from /home/users/step0ut/root/include/TDirectory.h:25,
from /home/users/step0ut/root/include/TROOT.h:29,
from gdecomp.h:5,
from read_basis.c:5:
/home/users/step0ut/root/include/Rtypeinfo.h:32:20: typeinfo: No such file or directory
In file included from /home/users/step0ut/root/include/Rtypes.h:30,
from /home/users/step0ut/root/include/TObject.h:31,
from /home/users/step0ut/root/include/TNamed.h:26,
from /home/users/step0ut/root/include/TDirectory.h:25,
from /home/users/step0ut/root/include/TROOT.h:29,
from gdecomp.h:5,
from read_basis.c:5:
/home/users/step0ut/root/include/Rtypeinfo.h:33: error: parse error before "std"
In file included from /home/users/step0ut/root/include/TObject.h:31,
from /home/users/step0ut/root/include/TNamed.h:26,
from /home/users/step0ut/root/include/TDirectory.h:25,
from /home/users/step0ut/root/include/TROOT.h:29,
from gdecomp.h:5,
from read_basis.c:5:
/home/users/step0ut/root/include/Rtypes.h:39: warning: type defaults to int' in declaration ofTClass’
/home/users/step0ut/root/include/Rtypes.h:39: warning: data definition has no type or storage class
/home/users/step0ut/root/include/Rtypes.h:40: error: parse error before “TBuffer”
/home/users/step0ut/root/include/Rtypes.h:40: warning: type defaults to int' in declaration ofTBuffer’
/home/users/step0ut/root/include/Rtypes.h:40: warning: data definition has no type or storage class
/home/users/step0ut/root/include/Rtypes.h:41: error: parse error before “TDirectory”
/home/users/step0ut/root/include/Rtypes.h:41: warning: type defaults to int' in declaration ofTDirectory’
/home/users/step0ut/root/include/Rtypes.h:41: warning: data definition has no type or storage class
/home/users/step0ut/root/include/Rtypes.h:42: error: parse error before “TMemberInspector”
/home/users/step0ut/root/include/Rtypes.h:42: warning: type defaults to int' in declaration ofTMemberInspector’
/home/users/step0ut/root/include/Rtypes.h:42: warning: data definition has no type or storage class
/home/users/step0ut/root/include/Rtypes.h:43: error: parse error before “TObject”
…
…