NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

example.cc problem

Hello netcdf experts,
   I just build libnetcdfc++.a and try to run example.cc under cxx dir.  I got 
an error message shown below

example.cc:68: no matching function for call to `NcVar::put (long int[2], 
unsigned int)'
netcdf.hh:244: candidates are: NcVar::put(const double *, const long int *)
netcdf.hh:243:                 NcVar::put(const float *, const long int *)
netcdf.hh:242:                 NcVar::put(const int *, const long int *)
netcdf.hh:241:                 NcVar::put(const short int *, const long int *)
netcdf.hh:240:                 NcVar::put(const char *, const long int *)
netcdf.hh:239:                 NcVar::put(const unsigned char *, const long int 
*)

thus, I change example.cc code line 68 
from 
static long frtimes[] = {12, 18};
into
static nclong frtimes[] = {12, 18};

then I can compile and link w/o problem.  The problem is while I run it, I got 
a segmentation Fault.  Any hint on this problem will be  appreciated.  
TIA
Cheers
Yu-Long

  • 1996 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: