Unidata / netcdf-cxx4

Official GitHub repository for netCDF-C++ libraries and utilities.
Other
126 stars 49 forks source link

problem building netcdf-cxx4 with CMake GUI for MS visual Studio 2017 #90

Open jbensabat opened 4 years ago

jbensabat commented 4 years ago

Hello I am trying to building netcdf-cxx (last available version) using CMake 3.17.0 for MS Visual Studio 2017 I have previously built hdf5 (debug and release) version 1.12.0 and netcdf (debug and release) version 4.7.3

The configuration process fails and this is what I get

Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363. Found bash: C:/Program Files/Git/bin/bash.exe Found netcdf: C:/Software/netcdf/4.7.3/build/liblib/Debug/netcdf.lib CMake Error at CMakeLists.txt:405 (CHECK_LIBRARY_EXISTS): CHECK_LIBRARY_EXISTS Macro invoked with incorrect arguments for macro named: CHECK_LIBRARY_EXISTS

Plugin support requires libhdf5 with H5Free support. Your libhdf5 install does not provide H5Free. Please install a newer version of libhdf5 if you require plugin compression support.

NetCDF C Configuration Summary

==============================

General


NetCDF Version: 4.3.2-developer Configured On:
Host System: -- Build Directory: C:/Software/netcdf/cxx/buid Install Prefix:

Compiling Options


C Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Professional/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe CFLAGS: /DWIN32 /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1 CPPFLAGS: /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 LDFLAGS: /machine:x64 /debug /INCREMENTAL AM_CFLAGS:
AM_CPPFLAGS:
AM_LDFLAGS:
Shared Library: yes Static Library: no Extra libraries:

Configuring incomplete, errors occurred! See also "C:/Software/netcdf/cxx/buid/CMakeFiles/CMakeOutput.log". See also "C:/Software/netcdf/cxx/buid/CMakeFiles/CMakeError.log".

any help would truly be appreciated.

best jac

WardF commented 4 years ago

NetCDF isn't currently guaranteed to be compatible with HDF5 1.12.x, and we haven't done much internal testing with it (although we have some external PR's to improve compatibility). Our user community has thus far remained largely on 1.8.x and 1.10.x.

I'd have to take a look and see if H5Free is present in the 1.12.x branch, but in the meantime, can you see if the issue persists with 1.10.x?

Thanks!

jbensabat commented 4 years ago

Hi We have already switched to hdf.12.x and netcdf-c works fine with it. it will be now difficult to go backwards. best jac

DennisHeimbigner commented 4 years ago

Did you by any chance try the filter tests with 1.12? That is a likely source of problems.

WardF commented 4 years ago

Hi We have already switched to hdf.12.x and netcdf-c works fine with it. it will be now difficult to go backwards. best jac

I'm glad to hear that, although it is not the experience we hear from much of our community, who continue to struggle with the performance of the 1.10.x branch and continue to remain on 1.8.x. I will take a look when I have a moment and see what needs to be done for the CXX cmake build system.

huaweiping commented 3 years ago

Hi I have the same problem when I want to build the netcdf-cxx4-4.3.1 with netCDF 4.7.2 and hdf5 1.10.6 for VS2019 on Windows 10 And also, Cmake asks for NC_DPKG on my windows when I try to configure the files.


CMake Error at CMakeLists.txt:405 (CHECK_LIBRARY_EXISTS): CHECK_LIBRARY_EXISTS Macro invoked with incorrect arguments for macro named: CHECK_LIBRARY_EXISTS

Plugin support requires libhdf5 with H5Free support. Your libhdf5 install does not provide H5Free. Please install a newer version of libhdf5 if you require plugin compression support.

NetCDF C Configuration Summary

==============================

General


NetCDF Version: 4.3.1 Configured On:
Host System: -- Build Directory: E:/netcdf-build Install Prefix:

Compiling Options


C Compiler: E:/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.28.29333/bin/Hostx64/x64/cl.exe CFLAGS: /DWIN32 /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1 CPPFLAGS: /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MDd /Zi /Ob0 /Od /RTC1 LDFLAGS: /machine:x64 /debug /INCREMENTAL AM_CFLAGS:
AM_CPPFLAGS:
AM_LDFLAGS:
Shared Library: yes Static Library: no Extra libraries: