I’m trying to compile code that uses netcdf and am running into problems. Here’s the error.
mpif90 -fopenmp -I/usr/lib64 -ffree-line-length-none -DNETCDF -c ezcdf_opncls.f90
ezcdf_opncls.f90:37: Error: Can't open included file 'netcdf.inc'
makefile:15: recipe for target 'ezcdf_opncls.o' failed
make[1]: *** [ezcdf_opncls.o] Error 1
In case you’re wondering compiling with gcc or gfortran gives the same error.
Looking for the libraries gives:
>locate libnetcdf
/usr/lib64/libnetcdf.settings
/usr/lib64/libnetcdf.so.7
/usr/lib64/libnetcdf.so.7.2.0
It is missing libnetcdf.a, and libnetcdff.la Furthermore, there is no netcdf.inc in /usr/include
I tried installing both the netcdf-devel and netcdf-devel-static libraries from the science repository using zypper, but those didn’t seem to fix the problem.
I’m pretty much a novice when it comes to these things, so any help would be appreciated.