Open nyckmaia opened 4 years ago
When you run cmake ..
, you will need to specify the HDF5_DIR location. For example, on my system, I have to invoke the following:
$ cmake .. -DCMAKE_PREFIX_PATH=[path to netcdf install] -DHDF5_DIR=[path to netcdf install]/cmake/hdf5
I will get our instructions updated, but in the meantime, does this help?
Thank you @WardF ...
My command now is this below, but I got the same error messages:
cmake .. -DCMAKE_PREFIX_PATH="C:\Program Files\netCDF 4.7.1" -DHDF5_DIR="C:\Program Files\netCDF 4.7.1\lib\cmake\hdf5"
The NetCDF is installed here: C:\Program Files\netCDF 4.7.1
Inside this folder I have 3 folders:
Inside lib
I have:
The HDF5 C library is installed here: C:\Program Files\HDF_Group\HDF5\1.10.5
Inside this folder I have:
So, could you help me to write the cmake ..
command?
Drop the 'lib' in the -HDF5_DIR, use -DHDF5_DIR=C:\Program Files\ netCDF 4.7.1\cmake\hdf5
. Does that give you the same error? I'm also unsure if you need to escape the spaces from the Windows command line. Try it without and let me know if that works.
Yes, I tried it:
cmake .. -DCMAKE_PREFIX_PATH="C:\Program Files\netCDF 4.7.1" -DHDF5_DIR="C:\Program Files\netCDF 4.7.1\cmake\hdf5"
But if you look my folder structure in my post above, the cmake
folder is inside the lib
folder.
So I can't remove the lib
in the path....but I tried too like this last command above.
Yes,, I got the same error messages.
About "escape spaces", I'm putting all path inside the " "
.
I tried to use "double back slashes" (\\
) , but it doesn't work too.
Is there another thing to try?
What shell are you using? e.g. windows cmd, window powershell, ?
I tried in 2 shells, and I got the same error on both:
The issue is in find_package() usage. I would recommend setting HDF5_DIR as an environmental variable and look at issue#88, that will help.
Hi,
I already downloaded binary NetCDF-C installer (called
netCDF4.7.1-NC4-DAP-64.exe
) from the offical website (link here) installed it and add the installed folder to myPATH
. So I tested it in the Windows console runing:ncdump.exe
...and all works good!Now I cloned the NetCDF-CXX4 repository and tried to compile it, but I got a lot of CMake errors.
My system is: Windows 10 x64 Visual Studio 2019 Enterprise CMake 3.14.4 NetCDF-CXX 4.3.1
What I did: Inside the cloned NetCDF-CXX4 folder, I created a folder called "build". Inside the
build
folder I typed:cmake ..
Here is the console error:
What I have to do to build the NetCDF-CXX4 static/dynamic libraries in my system?