[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 971013: problem installing fan-2.0



>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;
}