2014-02-21 06:48:01 +08:00
Installing and Using netCDF-C Libraries in Windows {#winbin}
==================================================
\brief NetCDF-C Libraries in a Windows Environment may be used under multiple sets of circumstances.
2015-03-13 03:48:32 +08:00
[TOC]
2013-02-13 06:22:54 +08:00
2015-03-13 03:48:32 +08:00
There are several development environments available for programmers who develop on Windows.
2013-02-13 06:22:54 +08:00
2014-02-21 06:48:01 +08:00
* `Microsoft Visual Studio `
* `MSYS/MinGW`
* `Cygwin`
For developers using `Microsoft Visual Studio` , you may download using the Windows build instructions, or you may download the pre-built netCDF-C libraries from this page.
2015-03-13 03:48:32 +08:00
For developers using `MSYS/MinGW` or `Cygwin` , you may build netCDF-C using the Linux/Unix build instructions.
2013-02-13 06:22:54 +08:00
2014-02-21 06:48:01 +08:00
> For complex builds that include netCDF-4 and/or DAP support this may prove tricky, as it is time consuming to collect all of the dependencies. In these cases it may be easier to use the pre-built `netcdf` packages provided by the `MSYS` and `Cygwin` environments.
2013-02-13 06:22:54 +08:00
2013-03-01 05:50:55 +08:00
Users who prefer to build the netCDF-C libraries from source in a Windows environment using Microsoft Visual Studio are referred to \ref netCDF-CMake
2015-03-13 03:48:32 +08:00
# Getting pre-built netCDF-C Libraries for Visual Studio {#msvc-prebuilt}
2013-02-13 06:22:54 +08:00
2019-06-18 04:41:50 +08:00
These libraries have been built using Visual Studio 2017. The downloads are installer packages which contain the netCDF-C libraries and utilities (ncgen, ncgen3, ncdump and nccopy), as well as the associated dependencies.
2013-02-13 06:22:54 +08:00
2014-12-02 04:47:20 +08:00
2015-03-13 03:48:32 +08:00
## Included Dependencies {#msvc-inc-deps}
2014-12-02 04:47:20 +08:00
The included dependencies and versions are as follows:
2017-10-18 05:33:49 +08:00
* `libhdf5` : 1.8.19
* `libcurl` : 7.55.1
2014-12-02 04:47:20 +08:00
* `zlib` : 1.2.8
2015-11-11 05:44:43 +08:00
## Latest Release (netCDF-C major.minor.point) {#msvc-latest-release}
2013-08-30 05:48:03 +08:00
2013-02-13 06:22:54 +08:00
Configuration | 32-bit | 64-bit |
:-------------------|:-------- |:-------|
2017-11-21 04:43:16 +08:00
netCDF 3 | [netCDFmajor.minor.point-NC3-32.exe][r1] | [netCDFmajor.minor.point-NC3-64.exe][r5]
2015-11-11 05:44:43 +08:00
netCDF3+DAP | [netCDFmajor.minor.point-NC3-DAP-32.exe][r2] | [netCDFmajor.minor.point-NC3-DAP-64.exe][r6]
netCDF4 | [netCDFmajor.minor.point-NC4-32.exe][r3] | [netCDFmajor.minor.point-NC4-64.exe][r7]
netCDF4+DAP | [netCDFmajor.minor.point-NC4-DAP-32.exe][r4] | [netCDFmajor.minor.point-NC4-DAP-64.exe][r8]
2013-02-13 06:22:54 +08:00
2015-03-13 03:48:32 +08:00
# Using the netCDF-C Libraries with Visual Studio {#msvc-using}
2013-02-13 06:22:54 +08:00
2015-03-13 03:48:32 +08:00
In order to use the netcdf libraries, you must ensure that the .dll files (along with any dependencies from deps/shared/bin) are on the system path. In order to compile a program using these libraries, you must first link your program against the appropriate 'import' (.lib) libraries.
## Install Hierarchy {#msvc-install-hierarchy}
2013-02-13 06:22:54 +08:00
2014-03-19 04:05:04 +08:00
When installed, the netCDF libraries are placed in the specified locations, along with the netCDF-C utilities and dependencies.
2013-02-13 06:22:54 +08:00
< center >
2014-12-06 06:13:36 +08:00
< IMG SRC = "InstallTreeWindows.png" width = "400" / >
2013-02-13 06:22:54 +08:00
< / center >
2015-03-13 03:48:32 +08:00
# Notes {#msvc-notes}
2013-02-13 06:22:54 +08:00
*The following points should be considered when using the netCDF-C libraries on Windows.*
2015-06-05 05:37:52 +08:00
1. When building the netCDF-C libraries with netCDF4 support, using the `Debug` libraries may cause extraneous warnings. These warnings are related to cross-dll memory management, and appear to be harmless. You can safely ignore them by using the `Release` libraries. [NCF-220]
2013-08-30 05:48:03 +08:00
2021-08-18 04:16:04 +08:00
[r1]: https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-netcdf-c/major.minor.point/windows_installers/netCDFmajor.minor.point-NC3-32.exe
[r2]: https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-netcdf-c/major.minor.point/windows_installers/netCDFmajor.minor.point-NC3-DAP-32.exe
[r3]: https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-netcdf-c/major.minor.point/windows_installers/netCDFmajor.minor.point-NC4-32.exe
[r4]: https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-netcdf-c/major.minor.point/windows_installers/netCDFmajor.minor.point-NC4-DAP-32.exe
[r5]: https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-netcdf-c/major.minor.point/windows_installers/netCDFmajor.minor.point-NC3-64.exe
[r6]: https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-netcdf-c/major.minor.point/windows_installers/netCDFmajor.minor.point-NC3-DAP-64.exe
[r7]: https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-netcdf-c/major.minor.point/windows_installers/netCDFmajor.minor.point-NC4-64.exe
[r8]: https://artifacts.unidata.ucar.edu/service/rest/repository/browse/downloads-netcdf-c/major.minor.point/windows_installers/netCDFmajor.minor.point-NC4-DAP-64.exe