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

[netCDF #VFM-345423]: Bug report

Hi Philip,

Thank you for the bug report.   Did you specify the 'USE_SZIP=ON' option when 
configuring netcdf?  This will tell cmake to explicitly search for the szip 

The other libraries are a bit more difficult at this point; in my tests I had 
used a shared libcurl, which the passes the upstream dependencies to cmake.  
Since you are using static libraries, there is no way for cmake to determine 
what additional dependencies are required.  With autotools-based builds you can 
specify additional libraries to link against via the LIBS="-l<library>" 
directive, but I am unaware of an equivalent for cmake.

In the short term, you may need to build the dependent libraries as shared 
libraries, or use a pre-built binary package available from 
http://www.unidata.ucar.edu/netcdf/win_netcdf.  These installers also have the 
dependencies in them, so it should be possible to link against the dependencies 
when you build netcdf; this will let you avoid rebuilding libhdf5, libcurl, 

Our netcdf-fortran package has an option, NC_EXTRA_DEPS, which is analogous to 
'LIBS' when autotools.  I expect I will add the same option to netcdf-c for the 
upcoming 4.3.3 release.  So another option may be to keep an eye out for the 
4.3.3 release, or watch our development branch 
(http://github.com/Unidata/netcdf-c); I will try to have this option committed 

I hope this helps,


> Hi
> I am just writing to report a bug with your CMake build system. I am
> building on Windows 8 using visual studio 11 generator with CMake 3. I
> am leaving all the default options with respect to external libraries
> so am building with hd5f, libcurl, szip and zlib. Unfortunately the
> cmake system is not including dependancies upon the szip library or
> the winsock and ldap libraries (ws2_32.lib and wldap32.lib) which are
> required via libcurl. This results in various linker errors.
> I am not sure if my system is particularly different to any other. I have
> libcurl built from source using the SSPI option for SSH support. I have
> hdf5 built from source and I have szip and zlib built from source. All
> are built as static libs using the static runtime.
> If you need any more information to diagnose the problem please let
> me know.
> Phil

Ticket Details
Ticket ID: VFM-345423
Department: Support netCDF
Priority: Normal
Status: Closed