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

[netCDF #NKX-593630]: Problems when installing netcdf



> Hello, I have some problems when trying to install netcdf and hoped you could 
> help me.I have done the following steps:1) I installed hdf5, zlib and curl2) 
> With these libraries I intslled netcdf using the following code of your 
> dokumentation:$ # Build and install netCDF-4$ NCDIR=/usr/local$ 
> CPPFLAGS='-I${H5DIR}/include -I${ZDIR}/include' 
> LDFLAGS='-L${H5DIR}/lib -L${ZDIR}/lib' ./configure --prefix=${NCDIR}$ 
> make check$ make install # or sudo make install Everything went fine till 
> then. Now I have a program where I want to use netcdf, but when I try to 
> compile it (I add -L/usr/local/lib -lnetcdf in the same line of the 
> compilation file), I always get the Error: 'include <netcdf>: 
> netcdf File not found.It is a C++ Code embedded into a C-Code and getting 
> compiled with g++. Also I use Kubuntu 20.04.I really don't know, how I 
> can fix this problem and hope you can help me. Sincerely,Sophie
> 
> 

Hello,

You'll need to add `-I/usr/local/include' when compiling, this will tell the 
compiler to look for include files (such as netcdf.h) in the /usr/local/include 
directory.  

Let us know if this doesn't resolve the issue.  Thank you!

-Ward


Ticket Details
===================
Ticket ID: NKX-593630
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.