Hi Robert, In root 2.23/12, the -p options of rootcint was, in practive, useless. In newer release, it substitute the rootcint macro-preprocessor by the system C-macro-preprocessor (usually either cpp or gcc -E). It is seems that rootcint from root 2.23/12 is having trouble digesting netdb.h. Since this release, cint and rootcint have greatly improved and you may be lucky enough that merely upgrading to the latest root fixes the problem. An alternative is to find where netdb.h is included and replace by a summary sufficient for the rootcint processing by doing something like #if !defined(__CINT__) #include "netdb.h" #else // here included forwarding or summary of netdb that is // needed for parsing the code. #endif Please note that if netdb was defining classes (which is certainly not the case), you would NOT be able to use the above fix if your own class were inherering from netdb's classes. A third alternative is to isolate the part of netdb.h that are not properly handled by cint/rootcint and forward is as a bug report to Masa. (note that you __should__ first upgrade to the latest root and cint before doing that). Philippe -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Robert Michaels Sent: Friday, March 16, 2001 5:25 AM To: roottalk@pcroot.cern.ch Subject: [ROOT] a rootcint question We are using root 2.23/12 on RedHat 6.2 (a bit behind the curve...). I had a problem using rootcint, e.g like this: rootcint -f AparDict.C -c -I/usr/local/root/include AparAnalysis.h AparData.h AparDataMap.h AparAsyAna.h AparPair.h THaCodaFile.h THaEtClient.h THaEtClient.h AparLinkDef.h This worked fine until I started added the class "THaEtClient" which has a header "et.h" that now causes a large number of warnings and errors. For what its worth, this class compiles and runs fine independently of root. Here is a sample of rootcint complaints: Warning: Unknown type (void) in function argyment FILE:/usr/include/netdb.h LINE:50 Error: Illegal pointer operation (tovalue) FILE:/usr/include/netdb.h LINE:68 Limitation: can not handle macro h_errno ( Use +P or -p option ...and another sample.... Warning: Unknown type (__conststructsockaddr*__restrict__sa,socklen_t__salen,char*__restrict__host , size_t__hostlen,char*__restrict__serv,size_t__servlen,int__flags) in function argyment FILE:/usr/include/netdb.h LINE:437 Error: Unexpected EOF G__fgetspace():2 FILE:/usr/include/netdb.h LINE:444 Advice: You may need to use +P or -p option So, then I tried putting +P or -p everywhere in the rootcint command, per the advice given, but it either failed in a different way or appeared to ignore it. Sorry if this is a vague question, but where should I put this option in the command line ? Perhaps this is a common problem and is there is a common fix ? Thanks. ------------------------------------------------------ Robert W. Michaels www.jlab.org/~rom phone (757) 269 7410 pager (757) 881 7897 Thomas Jefferson National Accelerator Facility 12000 Jefferson Ave, Newport News, VA 23606 USA
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:40 MET