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.
YuLeonard <yulq@xxxxxxx> writes: > No, I didn't. I thought you give me the right answer. Could you tell > me what's the difference between the libnetcdf libraries with and > without this option? Does this option affect the behavior of > programs (WRF, WPS etc.) I build later? > The netCDF library has always done something a little funny: it crammed fortran, fortran 90, and C functions into the same library. This was a convenience, so that only -lnetcdf needed to be used, whether you were linking to fortran or C. And this is still the default behavior of the netCDF build. But someones one wants the libraries to be separate. That's why --enable-separate-fortran is there, to put the fortran and fortran 90 functions in their own library, which must be included in addition to the C library. This is particularly useful when shared libraries are built, because otherwise the OS will look for the fortran run-time libraries even for C programs, and complain. So if you have built with --enable-shared, or --enable-separate-fortran, you need to include -lnetcdff on your link line, to get the fortran code. Otherwise -lnetcdf will get both C and Fortran. Does this answer your question? Thanks! Ed -- Ed Hartnett -- ed@xxxxxxxxxxxxxxxx
netcdfgroup
archives: