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.

Re: [netcdfgroup] nc-config --libs output -- should it include hdf5 libs if netcdf-4 enabled

  • To: "Ed Hartnett" <ed@xxxxxxxxxxxxxxxx>
  • Subject: Re: [netcdfgroup] nc-config --libs output -- should it include hdf5 libs if netcdf-4 enabled
  • From: "Gregory Sjaardema" <gdsjaar@xxxxxxxxxx>
  • Date: Tue, 6 Sep 2011 15:47:47 -0600
On 9/6/11 3:46 PM, Ed Hartnett wrote:
"Gregory Sjaardema"<gdsjaar@xxxxxxxxxx>  writes:

Should the nc-config --libs output show the hdf5 libraries that need
to be included on the link line in addition to the -lnetdf?  This also
applies to the curl and opendap and ... options.
If you have a shared library build, these other libraries are not
included, because they are not needed.

It would make it easier to have a generic build line for an executable
that would not change depending on whether netcdf-4 was enabled or not
enabled.  For example "cc -o my_exe `nc-config --cflags` my_exe.c
nc-config --libs`" should work for all cases.  As it is now,
additional logic is needed in each makefile/configure/build system
that uses the netcdf library.  It would be very nice if that
complexity were embedded in nc-config...
This should work now. Am I missing something?

Thanks,

Ed
We typically use non-shared library builds which need the hdf5 specified explicitly.
--Greg




  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: