Dear ROOTers,
After successfully compiling my program with MacOS X Snow Leopard and with OpenSUSE11.3 I wanted to compile it with VC++, too, but got cryptic error messages which I do not understand. I do not even know where to look because there are either no lines given or the line numbers do not make any sense. Here is the error message:
XPSPreProcessing.cxx
XPSPreProcessing.cxx(2784) : error C2090: function returns array
XPSPreProcessing.cxx(2784) : error C2528: '__iob_func' : pointer to reference is illegal
XPSPreProcessing.cxx(2784) : error C2556: 'Double_t ***__iob_func(void)' : overloaded function d
iffers only by return type from 'FILE *__iob_func(void)'
C:\Programme\Microsoft Visual Studio 9.0\VC\INCLUDE\stdio.h(132) : see declaration of '_
_iob_func'
XPSPreProcessing.cxx(2784) : error C2072: '__iob_func' : initialization of a function
XPSPreProcessing.cxx(2784) : error C2205: '__iob_func' : cannot initialize extern variables with
block scope
XPSPreProcessing.cxx(2784) : error C2440: 'initializing' : cannot convert from 'int' to 'Double_
t ***(void)'
There are no conversions to function types, although there are conversions to references
or pointers to functions
XPSPreProcessing.cxx(2875) : error C2440: '=' : cannot convert from 'Double_t *' to 'Double_t **
*'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or fu
nction-style cast
XPSPreProcessing.cxx(2890) : error C2440: '=' : cannot convert from 'double' to 'Double_t **'
XPSPreProcessing.cxx(3147) : error C2664: 'Int_t XAlgorithm::Calculate(Int_t,Double_t *,Double_t
*,Double_t *,Int_t *,Int_t *)' : cannot convert parameter 3 from 'Double_t ***' to 'Double_t *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or fu
nction-style cast
XPSPreProcessing.cxx(3186) : error C2665: 'TStat::Median' : none of the 4 overloads could conver
t all the argument types
c:\home\rabbitus\temp\rtmpjepftp\r.install31a85835\xps\src\TStat.h(114): could be 'Doubl
e_t TStat::Median(Int_t,const Double_t *,const Int_t *)'
c:\home\rabbitus\temp\rtmpjepftp\r.install31a85835\xps\src\TStat.h(116): or 'Doubl
e_t TStat::Median(Int_t,const Double_t *,UShort_t)'
while trying to match the argument list '(Int_t, Double_t ***, int)'
XPSPreProcessing.cxx(3195) : error C2665: 'TMath::Abs' : none of the 6 overloads could convert a
ll the argument types
c:\root\include\TMathBase.h(36): could be 'Short_t TMath::Abs(Short_t)'
c:\root\include\TMathBase.h(37): or 'Int_t TMath::Abs(Int_t)'
c:\root\include\TMathBase.h(38): or 'Long_t TMath::Abs(Long_t)'
c:\root\include\TMathBase.h(39): or 'Long64_t TMath::Abs(Long64_t)'
c:\root\include\TMathBase.h(40): or 'Float_t TMath::Abs(Float_t)'
c:\root\include\TMathBase.h(41): or 'Double_t TMath::Abs(Double_t)'
while trying to match the argument list '(Double_t **)'
XPSPreProcessing.cxx(3197) : error C2664: 'TMath::Log2' : cannot convert parameter 1 from 'Doubl
e_t **' to 'Double_t'
There is no context in which this conversion is possible
XPSPreProcessing.cxx(3270) : error C2106: '=' : left operand must be l-value
make: *** [XPSPreProcessing.obj] Error 2
ERROR: compilation failed for package 'xps'
Enclosed I am attaching file “XPSPreProcessing.cxx”. Please note that earlier versions of this file compiled fine with VC++, thus the problems must be in one of the new functions:
virtual Int_t QualityControl(Int_t numdata, TTree **datatree,
Int_t numbgrd, TTree **bgrdtree, const char *option);
virtual Int_t DoDataQualityControl(Int_t numdata, TTree **datatree,
TTree **resdtree, TTree **exprtree,
XDNAChip *chip, TFile *file);
virtual Int_t DoBorderElements(Int_t numdata, TTree **datatree,
TTree **bordtree, XDNAChip *chip, TFile *file);
virtual Int_t DoBgrdQualityControl(Int_t numbgrd, TTree **bgrdtree,
XDNAChip *chip, TFile *file);
I would greatly appreciate any help, since I do not know where to look and there are no lines given by VC++.
Thank you very much.
Best regards
Christian
XPSPreProcessing.cxx (361 KB)