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: David William Pierce <dpierce@xxxxxxxx>
  • Date: Wed, 7 Sep 2011 08:50:07 -0700
> > OK, sorry for the confusion.  If I do build just the static library
> > (--disable-shared), then nc-config does show all of the libraries.
> > However, if I build both shared and static, then nc-config shows only
> > the netcdf library.  In my use, we install both shared and static
> > libraries and some applications link to the shared and some to the
> > static and they need some way to get all of the library information
> > from the nc-config...
> >
> > Thanks,
> > --Greg
>
> Ah ha! Now I get it.
>
> So would you like to have all libraries listed, even for shared builds?
> I believe this will be harmless...
>
> Anyone else have a preference on this?
>
> Thanks,
>
> Ed
>

I would vote against having all the libraries listed for a shared build. In
general, it's always a bad idea to double specify information, because then
you don't know which version of the information is being used. Can you
imagine the confusion if you specified what you thought was the correct
version of the library while making the shared library, and then removed
that specification, but the final result was still being linked with that
library anyway? Specifying information that is not used, but to all
appearances is being used, is highly problematical.

An additional --static-libs flag would handle the problem more transparently
and convey accurately what the build system is doing.

Regards,

--Dave


-- 
David W. Pierce
Division of Climate, Atmospheric Science, and Physical Oceanography
Scripps Institution of Oceanography
(858) 534-8276 (voice)  /  (858) 534-8561 (fax)    dpierce@xxxxxxxx
  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: