This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi Basit, > In the bin directory of netcdf libraries there is one executable nc-config > that gives information of current configuration of netcdf libraries. I > found that nc-config information is incorrect about netcdf libraries > and some flags. For example see the following > > $ nc-config --all > --cc -> icc > --cflags -> -I/home/khanb/temp/include -I/home/khanb/zlib/include > --libs -> -L/home/khanb/temp/lib -lnetcdf > > --cxx -> icpc > --has-c++ -> yes > > --fc -> ifort > --fflags -> -g -I/home/khanb/temp/include > --flibs -> -L/home/khanb/temp/lib -lnetcdff -lnetcdf > --has-f77 -> yes > --has-f90 -> yes > > --has-dap -> yes > --has-nc2 -> yes > --has-nc4 -> no > --has-hdf5 -> no > --has-hdf4 -> no > --has-pnetcdf-> no > --has-szlib -> > > --prefix -> /home/khanb/temp > --includedir-> /home/khanb/temp/include > --version -> netCDF 4.1.3 > --------------------------------------- > > In the above nc-config output locations for --cflags, --libs,--fflags, > --flibs, --prefix and --includedir are incorrect. The */temp/* directory > does not exist at all. I created this directory longtime ago and then > deleted it later on. After that i have compiled netcdf dozens of time. Of > course i do make distclean and make clean before any compile but i > keep getting the same old directory paths for the flags and --prefix. > Could you please advise why nc-config keep giving me old netcdf paths > (that does not exist anymore) and how can i fix it. To update nc-config after compiling netCDF, you must run "make install" after "make check". Otherwise, the old installed version of all the libraries, executables, and documentation will not be replaced by the new versions you have built. Typically (depending on the permissions required to overwrite files unser the installation directory named in the --prefix option), you will have to run "make install" using sudo or root permissions. I hope this helps ... --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: ACV-125667 Department: Support netCDF Priority: Normal Status: Closed