This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Greg, I'm trying to reproduce the problem and running into a compile problem with NcFiles.C. When I try to compile it on a Solaris 10 platform with Sun's C++ compiler, I get: $ CC -I/buddy/russ/nc4-binary/include NcFiles.C -o gr -L/buddy/russ/nc4-binary/lib -lnetcdf_c++ -lnetcdf "NcFiles.C", line 78: Error: d_type is not a member of dirent. "NcFiles.C", line 81: Error: DT_DIR is not defined. "NcFiles.C", line 82: Error: DT_REG is not defined. 3 Error(s) detected. With g++, I get the similar: $ g++ -I/buddy/russ/nc4-binary/include NcFiles.C -o gr -L/buddy/russ/nc4-binary/lib -lnetcdf_c++ -lnetcdf In file included from /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.0.2/../../../../include/c++/4.0.2/backward/iostream.h:31, from NcFiles.C:30: /opt/csw/gcc4/lib/gcc/i386-pc-solaris2.8/4.0.2/../../../../include/c++/4.0.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated. NcFiles.C: In function 'int main(int, char**)': NcFiles.C:78: error: 'struct dirent' has no member named 'd_type' NcFiles.C:81: error: 'DT_DIR' was not declared in this scope NcFiles.C:82: error: 'DT_REG' was not declared in this scope My C++ is a little rusty, so before I dig deeper into this, do you recognize the dirent problems? --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: ZBS-432143 Department: Support netCDF Priority: Normal Status: Closed