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.
>To: address@hidden >From: Gene Gamble <address@hidden> >Subject: problem installing fan-2.0 >Organization: . >Keywords: 199710131844.MAA10677 Hi Gene, > I have been trying to install the FAN software but have had problems > compiling some of the subroutines. In particular d2nc.c has undefined > variables. I an attaching a log file which contains the following: > output from uname -a > make: stdout and stderr > install: stdout and stderr > ls -lR of the source directory > I've grepped the entire source directory for the undefined variables > but they did not appear anywhere. Maybe I'm missing an include file? > I've already installed netcdf, udunits, and they appear to be working > ok. Any help you can provide would be greatly appreciated > > Sincerely > Gene Gamble ... > make[1]: Entering directory > `/home/gamble/mybuild/SOURCES/fan-2.0.2/src/fanlib' > gcc -ansi -c -O -I.. -I/usr/include -I/usr/include Calloc.c > gcc -ansi -c -O -I.. -I/usr/include -I/usr/include argSplit.c > gcc -ansi -c -O -I.. -I/usr/include -I/usr/include d2nc.c > d2nc.c: In function `d2nc': > d2nc.c:33: `SCHAR_MIN' undeclared (first use this function) > d2nc.c:33: (Each undeclared identifier is reported only once > d2nc.c:33: for each function it appears in.) > d2nc.c:33: `SCHAR_MAX' undeclared (first use this function) > d2nc.c:38: `CHAR_MIN' undeclared (first use this function) > d2nc.c:38: `CHAR_MAX' undeclared (first use this function) > d2nc.c:43: `SHRT_MIN' undeclared (first use this function) > d2nc.c:43: `SHRT_MAX' undeclared (first use this function) > d2nc.c:48: `LONG_MIN' undeclared (first use this function) > d2nc.c:48: `LONG_MAX' undeclared (first use this function) It appears as if you may be missing the limits.h include file, which on our Solaris system can be found in /usr/include/limits.h. That's where all these constants are supposed to be declared. I've appended a 7-line test program that compiles, links, and executes OK with gcc 2.7.2 on our Solaris 2.5.1. platform, invoked with "gcc -o l l.c; ./l". If this doesn't work with your gcc, you may want to try to find out what's wrong with the gcc configuration and fix it first using this little test program. --Russ _____________________________________________________________________ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu #include <limits.h> #include <stdio.h> int main() { (void)printf("SCHAR_MIN=%d\n", SCHAR_MIN); return 0; }