[ncl-install] sd_nc* undefined references

Jeff Dusenberry jdusenberry at whoi.edu
Thu Mar 6 08:30:32 MST 2008


> Please edit the files
> 
>     NclHDF.c
> and
>     NclHDFEOS.c
> 
> located in the directory .../ni/src/ncl directory (relative to your 
> source code install root point) and remove the following line from each:
> 
>     #include <hdf/netcdf.h>

Rick,

The above change allowed me to compile NclHDFEOS.c.  However, the 
compilation of NclHDF.c still complained about undefined variables.  I 
tried some different things and found that moving the

#include <hdf/netcdf.h>

line above the

#include <hdf/mfhdf.h>

line and dropping the 'hdf/' part seems to have worked.  i.e.:

# diff -u NclHDF.c{.orig,}
--- NclHDF.c.orig       2008-03-05 17:22:34.000000000 -0500
+++ NclHDF.c    2008-03-06 09:45:00.000000000 -0500
@@ -23,8 +23,8 @@
  #include <ncarg/hlu/NresDB.h>
  #include "defs.h"
  #define HAVE_NETCDF
+#include <netcdf.h>
  #include <hdf/mfhdf.h>
-#include <hdf/netcdf.h>
  #include "NclData.h"
  #include "NclFileInterfaces.h"
  #include <math.h>

If for some reason, that is not the way to fix this, let me know. 
Otherwise I'll give this one a try.

Thanks for your help with this.

Jeff



More information about the ncl-install mailing list