[Gdal-dev] undeclared identifier in netcdfdataset.cpp

Jack Varga jvarga at boulder.net
Fri Dec 10 12:53:01 EST 2004


Norman, (or anyone using netcdf prior to v. 3.5.1),

Would you mind doing me a small favor?  Since you're using an earlier
version of netcdf (3.5.0 and I'm using 3.5.1) and you compiled
ok (assumingly) would you mind grep-ing for one of these vars in the
netcdf includes to see if you get anything?  There are some noticeable
differences.  For example, my version of ncgen doesn't even have an
available '--help' options.

nc_inq_var
nc_inq_varndims
nc_get_vara_uchar

I would be indebted. 

Thanks,

Jack Varga

Norman Vine wrote:

>Jack Varga writes:
>  
>
>>>I'm wondering if this problem might be related to stricter enforcement 
>>>of ISO/ANSI standards in gcc/++ 3.4.1, (default compiler for my 
>>>distro, Mandrake 10.1).  I don't know where the undeclared identifier 
>>>is attempting to be referenced from.  Any suggestions or ideas would 
>>>be appreciated.  I'm using version 3.5.1 of netcdf.
>>>
>>>make[2]: Entering directory `/home/builder/gdal-1.2.5/frmts/netcdf'
>>>/bin/sh ../../libtool --mode=compile /usr/bin/g++ -Wall  -O2    
>>>-I../../port -I../../gcore -I../../ogr -I../../alg 
>>>-I/usr/include/c++/3.4.1 -I../../port    -c -o ../o/netcdfdataset.o 
>>>netcdfdataset.cpp
>>>/usr/bin/g++ -Wall -O2 -I../../port -I../../gcore -I../../ogr 
>>>-I../../alg -I/usr/include/c++/3.4.1 -I../../port -c 
>>>netcdfdataset.cpp  -fPIC -DPIC -o ../o/.libs/netcdfdataset.o
>>>netcdfdataset.cpp: In constructor 
>>>`netCDFRasterBand::netCDFRasterBand(netCDFDataset*, int, int, int)':
>>>netcdfdataset.cpp:117: error: `nc_inq_var' undeclared (first use this 
>>>function)
>>>netcdfdataset.cpp:117: error: (Each undeclared identifier is reported 
>>>only once for each function it appears in.)
>>>netcdfdataset.cpp:128: error: `NC_INT' undeclared (first use this 
>>>function)
>>>netcdfdataset.cpp: In member function `virtual CPLErr 
>>>netCDFRasterBand::IReadBlock(int, int, void*)':
>>>netcdfdataset.cpp:157: error: `nc_inq_varndims' undeclared (first use 
>>>this function)
>>>      
>>>
>
>My guess is that you haven't passed in your path to your netcdf installation
>
>try --with-netcdf=$PATH_TO_NETCDF_HOME
>
>< maybe something changed with netcdf 3.51 but .... >
>
>HTH
>
>Norman
>
>==== following with GDAL CVS 10-Dec-2004  4:48:38a EST ====
>
><518> gdal
>$ gcc --version
>gcc (GCC) 3.4.1 (cygming special)
>Copyright (C) 2004 Free Software Foundation, Inc.
>This is free software; see the source for copying conditions.  There is NO
>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
><519> gdal
>$ ncgen --help
><snip>
>ncgen: -: netcdf library version 3.5.0 of Jan 24 2004 06:34:11 $
>
><520> gdal
>$ gdalinfo --formats
>Supported Formats:
><snip>
>  GMT (rw): GMT NetCDF Grid Format
>  netCDF (ro): network Common Data Format
><snip>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20041210/559fc708/attachment.html


More information about the Gdal-dev mailing list