Hi,
i need to compile program using ROOT libraries, but calling them via (Linux) command line and not entering the ROOT interactive session. I’m using this compile options (only those regarding ROOT):
$(root-config --cflags) $(root-config --glibs) -Wall -O -fPIC
However i’m getting this errors during the compile phase dealing with mathcalls.h and TMath.h.
In file included from /usr/include/math.h:70,
from /afs/cern.ch/user/c/calviani/root/include/TMath.h:525,
from /afs/cern.ch/user/c/calviani/root/include/TString.h:32,
from /afs/cern.ch/user/c/calviani/root/include/TCollection.h:34,
from /afs/cern.ch/user/c/calviani/root/include/TSeqCollection.h:26,
from /afs/cern.ch/user/c/calviani/root/include/TList.h:26,
from /afs/cern.ch/user/c/calviani/root/include/TNamed.h:29,
from /afs/cern.ch/user/c/calviani/root/include/TTree.h:30,
from marco_new_single.c:31:
/usr/include/bits/mathcalls.h:110: error: conflicting declaration ‘double (logfunc)(double)’
/usr/include/shift/log.h:20: error: ‘logfunc’ has a previous declaration as void (*logfunc)(int, char*, ...)' /usr/include/bits/mathcalls.h:110: error: type mismatch with previous external decl of
double (logfunc)(double)’
/usr/include/shift/log.h:20: error: previous external decl of void (*logfunc)(int, char*, ...)' /usr/include/bits/mathcalls.h:110: error: conflicting declaration 'double (*logfunc)(double)' /usr/include/shift/log.h:20: error: 'logfunc' has a previous declaration as
void (logfunc)(int, char, …)‘
In file included from /usr/include/math.h:70,
from /afs/cern.ch/user/c/calviani/root/include/TMath.h:525,
from /afs/cern.ch/user/c/calviani/root/include/TString.h:32,
from /afs/cern.ch/user/c/calviani/root/include/TCollection.h:34,
from /afs/cern.ch/user/c/calviani/root/include/TSeqCollection.h:26,
from /afs/cern.ch/user/c/calviani/root/include/TList.h:26,
from /afs/cern.ch/user/c/calviani/root/include/TNamed.h:29,
from /afs/cern.ch/user/c/calviani/root/include/TTree.h:30,
from marco_new_single.c:31:
/usr/include/bits/mathcalls.h:110:1: pasting “" and “(” does not give a valid preprocessing token
/usr/include/bits/mathcalls.h:110: error: cannot convert void (*)(int, char*, ...)' to
double’ in initialization
/usr/include/bits/mathcalls.h:110: error: expected ,' or
;’ before ‘(’ token
In file included from /usr/include/math.h:93,
from /afs/cern.ch/user/c/calviani/root/include/TMath.h:525,
from /afs/cern.ch/user/c/calviani/root/include/TString.h:32,
from /afs/cern.ch/user/c/calviani/root/include/TCollection.h:34,
from /afs/cern.ch/user/c/calviani/root/include/TSeqCollection.h:26,
from /afs/cern.ch/user/c/calviani/root/include/TList.h:26,
from /afs/cern.ch/user/c/calviani/root/include/TNamed.h:29,
from /afs/cern.ch/user/c/calviani/root/include/TTree.h:30,
from marco_new_single.c:31:
/usr/include/bits/mathcalls.h:110:1: pasting “)” and “f” does not give a valid preprocessing token
In file included from /usr/include/math.h:93,
from /afs/cern.ch/user/c/calviani/root/include/TMath.h:525,
from /afs/cern.ch/user/c/calviani/root/include/TString.h:32,
from /afs/cern.ch/user/c/calviani/root/include/TCollection.h:34,
from /afs/cern.ch/user/c/calviani/root/include/TSeqCollection.h:26,
from /afs/cern.ch/user/c/calviani/root/include/TList.h:26,
from /afs/cern.ch/user/c/calviani/root/include/TNamed.h:29,
from /afs/cern.ch/user/c/calviani/root/include/TTree.h:30,
from marco_new_single.c:31:
/usr/include/bits/mathcalls.h:110: error: expected initializer before “f”
/usr/include/bits/mathcalls.h:110:1: pasting "” and “(” does not give a valid preprocessing token
/usr/include/bits/mathcalls.h:110: error: conflicting declaration ‘float '
/usr/include/bits/mathcalls.h:110: error: '’ has a previous declaration as double __' /usr/include/bits/mathcalls.h:110: error: type mismatch with previous external decl of
float __’
/usr/include/bits/mathcalls.h:110: error: previous external decl of double __' /usr/include/bits/mathcalls.h:110: error: declaration of
float __’
/usr/include/bits/mathcalls.h:110: error: conflicts with previous declaration double __' /usr/include/bits/mathcalls.h:110:1: pasting ")" and "f" does not give a valid preprocessing token /usr/include/bits/mathcalls.h:110: error: cannot convert
void ()(int, char, …)’ to float' in initialization /usr/include/bits/mathcalls.h:110: error: expected
,’ or ;' before "f" In file included from /usr/include/math.h:114, from /afs/cern.ch/user/c/calviani/root/include/TMath.h:525, from /afs/cern.ch/user/c/calviani/root/include/TString.h:32, from /afs/cern.ch/user/c/calviani/root/include/TCollection.h:34, from /afs/cern.ch/user/c/calviani/root/include/TSeqCollection.h:26, from /afs/cern.ch/user/c/calviani/root/include/TList.h:26, from /afs/cern.ch/user/c/calviani/root/include/TNamed.h:29, from /afs/cern.ch/user/c/calviani/root/include/TTree.h:30, from marco_new_single.c:31: /usr/include/bits/mathcalls.h:110:1: pasting ")" and "l" does not give a valid preprocessing token In file included from /usr/include/math.h:114, from /afs/cern.ch/user/c/calviani/root/include/TMath.h:525, from /afs/cern.ch/user/c/calviani/root/include/TString.h:32, from /afs/cern.ch/user/c/calviani/root/include/TCollection.h:34, from /afs/cern.ch/user/c/calviani/root/include/TSeqCollection.h:26, from /afs/cern.ch/user/c/calviani/root/include/TList.h:26, from /afs/cern.ch/user/c/calviani/root/include/TNamed.h:29, from /afs/cern.ch/user/c/calviani/root/include/TTree.h:30, from marco_new_single.c:31: /usr/include/bits/mathcalls.h:110: error: expected initializer before "l" /usr/include/bits/mathcalls.h:110:1: pasting "__" and "(" does not give a valid preprocessing token /usr/include/bits/mathcalls.h:110: error: conflicting declaration 'long double __' /usr/include/bits/mathcalls.h:110: error: '__' has a previous declaration as
double __’
/usr/include/bits/mathcalls.h:110: error: type mismatch with previous external decl of long double __' /usr/include/bits/mathcalls.h:110: error: previous external decl of
double __’
/usr/include/bits/mathcalls.h:110: error: declaration of long double __' /usr/include/bits/mathcalls.h:110: error: conflicts with previous declaration
double __’
/usr/include/bits/mathcalls.h:110:1: pasting “)” and “l” does not give a valid preprocessing token
/usr/include/bits/mathcalls.h:110: error: cannot convert void (*)(int, char*, ...)' to
long double’ in initialization
/usr/include/bits/mathcalls.h:110: error: expected ,' or
;’ before "l"
In file included from /afs/cern.ch/user/c/calviani/root/include/TString.h:32,
from /afs/cern.ch/user/c/calviani/root/include/TCollection.h:34,
from /afs/cern.ch/user/c/calviani/root/include/TSeqCollection.h:26,
from /afs/cern.ch/user/c/calviani/root/include/TList.h:26,
from /afs/cern.ch/user/c/calviani/root/include/TNamed.h:29,
from /afs/cern.ch/user/c/calviani/root/include/TTree.h:30,
from marco_new_single.c:31:
/afs/cern.ch/user/c/calviani/root/include/TMath.h: In function Double_t TMath::Log(Double_t)': /afs/cern.ch/user/c/calviani/root/include/TMath.h:638: warning: converting to
int’ from `Double_t’
/afs/cern.ch/user/c/calviani/root/include/TMath.h:638: error: too few arguments to function
/afs/cern.ch/user/c/calviani/root/include/TMath.h:638: error: void value not ignored as it ought to be
The following are the “include” i’ve added in my program:
#include “dblock.h”
#include “event_build.h”
#include
#include
#include
#include
#include
#include “EVprototypes.h”
#include
What can be the cause of this?
PS: i’m using ROOT 5.14/00
Regards,
Marco