[Brahms-dev-l] brat compilation and redhat 7.3 / gcc2.96

From: Djamel Ouerdane <ouerdane@nbi.dk>
Date: Thu Apr 29 2004 - 07:04:50 EDT
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
Received on Thu Apr 29 07:05:28 2004

This archive was generated by hypermail 2.1.8 : Thu Apr 29 2004 - 07:05:49 EDT