Closed akenmorris closed 4 years ago
FWIW, it looks like nc4hdf.c
is moved to a different folder in the current version of VTK, from
https://github.com/Kitware/VTK/tree/master/ThirdParty/netcdf/vtknetcdf/libsrc4
to
https://github.com/Kitware/VTK/blob/master/ThirdParty/netcdf/vtknetcdf/libhdf5
and its smaller than the original (number of lines).
It might be worth trying it out with a newer version of VTK.
From nc4internal.h:
Perhaps for some reason this file is being parsed without WIN32 when on Debug/RelWithDebInfo
That may be, VS 2015 defines _WIN32, not WIN32
https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?redirectedfrom=MSDN&view=vs-2019
I can't imagine it should differ between Release and RelWithDebInfo (or Debug)
Working now. Adding -DWIN32 for the VTK build fixed it. The GitHub action does not work because the rest of the script for packaging assumes a Release build. I don't think there's much reason to deploy debug builds, so I won't worry about that. But we should probably add a "--debug" option to build_dependencies.sh for windows.
@0leks
Thanks @akenmorris and @medakk! This is very helpful!
This was completed. Debut builds for all!
I am unable to build a Debug build for Windows. Since issue #466 is still open, I'll add more there.
Apparently debug was working until we started using the libraries from conda (for OpenVDB). I think the main issue is that you typically can't mix Debug and Release stuff on Windows because they use a different C++ runtime. Some libraries like Qt will ship with both (the debug ones have a 'd' suffix). I could not find any way to ask conda to install debug versions of these libraries, so at this point I don't know how to build debug on windows.
We've made significant progress in the branch try_windows_debug:
https://github.com/SCIInstitute/ShapeWorks/tree/try_windows_debug
At this point, VTK won't build with Debug or RelWithDebInfo:
D:\a\bdeps\vtk\ThirdParty\netcdf\vtknetcdf\libsrc4\nc4hdf.c(3638,25): error C2177: constant too big
I found this:
http://vtk.1045678.n5.nabble.com/Trouble-compiling-VTK-7-1-0-with-MSVC-2015-td5742220.html
They suggest, "I suspect that cmake did not find the Windows SDK", which doesn't really make any sense.
After several hours working on this, I'm giving up and suggesting that if developers want to build in Debug mode that they use either Mac or Linux (or take up where Oleks and I left off with this branch). I'm just creating the issue to document the status and progress.