[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #MEI-162758]: NetCDF static library for Windows



Hello,

If you want to install netcdf with NetCDF4/HDF5 support, in a static fashion, 
you will need to build a static version of hdf5 (as opposed to the shared 
.dll).  If you do not require netCDF4 support, you can disable support for it 
at configure time and build a static netcdf with no dependencies.  

I'm afraid we don't have a script we can provide; in the past I attempted to 
provide scripts but computing environments are so varied I'm afraid it wasn't 
practical.  

You should be able to build a static hdf5 and link against that when building 
netCDF; this should give you the static library with no dependencies that you 
are looking for.

I hope this helps,

-Ward

> Dear Sir/Mdm,
> 
> I am trying to rebuild static library of netcdf using BUILD_SHARED_LIBS=OFF 
> on windows platform.
> It is successful, but the static lib is still dependent on hdf5.dll I think.
> 
> Now what I want is the built library (static or shared) will not explicitly
> be dependent on hdf5.dll and hdf5_hl.dll.
> 
> From searching your website, it seems the following thread is much similar
> to what I want.  And there is also an unofficial script to do that.
> 
> How can I try that script or do you know the procedure to build such a
> static library?
> 
> Thanks and best regards!
> 
> Lu Li Lei
> 
> [Date 
> Prev<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg13456.html>][Date
>  
> Next<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg13458.html>][Thread
>  
> Prev<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg13456.html>][Thread
>  
> Next<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg13458.html>][Date
>  
> Index<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/maillist.html#13457>][Thread
>  
> Index<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/threads.html#13457>]
> [netCDF #MEI-162758]: NetCDF static library for Windows
> ________________________________
> 
> *   To: address@hidden<mailto:address@hidden>
> *   Subject: [netCDF #MEI-162758]: NetCDF static library for Windows
> *   From: "Unidata netCDF Support" <address@hidden<mailto:address@hidden>>
> *   Date: Mon, 01 Feb 2016 13:44:08 -0700
> 
> ________________________________
> 
> Hello Charles,
> 
> Currently, we only provide the shared libraries (.dll), as you have observed.
> To get static versions of the library, you would need to recompile at least
> netCDF; you would also need to recompile the dependencies as well, depending 
> on
> what capabilities you want the netcdf library to possess.  If you wanted a
> bare-bones netCDF3 library, there aren't actually any dependencies you need to
> worry about.  If you wanted a full blown netCDF4 library, you would need to
> recompile zlib, hdf5 and libcurl to get netCDF4 and DAP support.
> 
> This can be a bit cumbersome; if you are interested, I can provide you a 
> script
> that I use for re-building the dependencies on Windows.  It uses cmake to
> generate Visual Studio projects and then cmake again as a VS-frontend to
> compile everything on the command line.  The script would purely be for
> reference; it's not an 'official' Unidata tool/product, but it sounds like it
> might be helpful.
> 
> I'm sorry I can't provide a more immediately helpful response!
> 
> -Ward
> 
> > Hello,
> 
> >
> 
> > I downloaded the NetCDF binaries for Windows and used it with success.
> > However I would like to use a static version of the library, not the dll.
> > I read the instructions at
> >
> > http://www.unidata.ucar.edu/software/netcdf/docs/winbin.html
> >
> > and it seems that the dll are mandatory.
> >
> > How can I get a fully static version of NetCDF for Windows? Do I have to
> > re-compile everything by myself in static mode, or are the static binary
> > also available somewhere?
> >
> > Any advice will be greatly appreciated.  Thanks a lot !
> >
> > Best regards,
> >
> > Charles Verron
> >
> 
> 
> Ticket Details
> ===================
> Ticket ID: MEI-162758
> Department: Support netCDF
> Priority: Normal
> Status: Closed
> 
> ________________________________
> 
> *   Prev by Date: [netCDF #BRZ-403226]: Error while installing netcdf-fortran 
> 4.4.2<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg13456.html>
> *   Next by Date: [netCDF #KWS-195468]: 
> Question<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg13458.html>
> *   Previous by thread: [netCDF #BRZ-403226]: Error while installing 
> netcdf-fortran 
> 4.4.2<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg13456.html>
> *   Next by thread: [netCDF #KWS-195468]: 
> Question<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/msg13458.html>
> *   Index(es):
> *   
> Date<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/maillist.html#13457>
> *   
> Thread<http://www.unidata.ucar.edu/support/help/MailArchives/netcdf/threads.html#13457>
> 
> NOTE: All email exchanges with Unidata User Support are recorded in the 
> Unidata inquiry tracking system and then made publicly available through the 
> web. If you do not want to have your interactions made available in this way, 
> you must let us know in each email you send to us.
> 
> 
> 


Ticket Details
===================
Ticket ID: MEI-162758
Department: Support netCDF
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.



NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.