Hi Djam, It is quite a while since brat has been compiled against gcc2.96 at least that I am aware of Both rcf as well as the pii's are various versions of gcc3.x.y. Since it is not needed in this gcc version my best advice is to add the include statement, but enclose it in some appropriate #ifdef guard - why don't you ask the local guru. flemming ---------------------------------------------------------------- Flemming Videbaek Physics Department Brookhaven National Laboratory e-mail: videbaek@bnl.gov phone: 631-344-4106 ----- Original Message ----- From: "Djamel Ouerdane" <ouerdane@nbi.dk> To: "Brahms Devel List" <brahms-dev-l@lists.bnl.gov> Sent: Thursday, April 29, 2004 7:04 AM Subject: [Brahms-dev-l] brat compilation and redhat 7.3 / gcc2.96 > Hello, > > Today, I'm working on one of our local workstations (not my laptop). It's > a redhat 7.3 box with gcc2.96. Compiling brat gave me this error: > > BrRdbmDb.cxx: In method `Bool_t BrRdbmDb::ReadBratDbRc ()': > BrRdbmDb.cxx:197: aggregate `stat statBuffer' has incomplete type and > cannot be initialized > BrRdbmDb.cxx:198: invalid use of undefined type `struct stat' > BrRdbmDb.cxx:197: forward declaration of `struct stat' > BrRdbmDb.cxx:203: `S_ISREG' undeclared (first use this function) > BrRdbmDb.cxx:203: (Each undeclared identifier is reported only once for > each function it appears in.) > BrRdbmDb.cxx:208: `S_ISDIR' undeclared (first use this function) > BrRdbmDb.cxx:212: `S_IRUSR' undeclared (first use this function) > BrRdbmDb.cxx:212: `S_IWUSR' undeclared (first use this function) > > > The fix (and I'm sure it's an ugly one) is to add #include <sys/stat.h> > > Why should I have to do that for the thing to compile ?? > Can someone more clever in C/C++ programming give me a better fix ? > > Djam > > > -- > Djamel Ouerdane ------------------------------------------o > | Niels Bohr Institute | Home: | > | Blegdamsvej 17, DK-2100 Ø | Jagtvej 141 2D, | > | Fax: +45 35 32 50 16 | DK-2200 Copenhagen N | > | Tel: +45 35 32 52 69 | +45 35 86 19 74 | > | http://www.nbi.dk/~ouerdane | > | ouerdane@nbi.dk | > o---------------------------------------------------------o > > > _______________________________________________ > Brahms-dev-l mailing list > Brahms-dev-l@lists.bnl.gov > http://lists.bnl.gov/mailman/listinfo/brahms-dev-l > _______________________________________________ Brahms-dev-l mailing list Brahms-dev-l@lists.bnl.gov http://lists.bnl.gov/mailman/listinfo/brahms-dev-lReceived on Thu Apr 29 08:04:50 2004
This archive was generated by hypermail 2.1.8 : Thu Apr 29 2004 - 08:05:08 EDT