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

  • To: "Gregory Sjaardema" <gdsjaar@xxxxxxxxxx>
  • Subject: Re: [netcdfgroup] nc-config --libs output -- should it include hdf5 libs if netcdf-4 enabled
  • From: Ed Hartnett <ed@xxxxxxxxxxxxxxxx>
  • Date: Tue, 06 Sep 2011 15:46:06 -0600
"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
-- 
Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx



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