VTK 8.2 does not account for SZIP and ZLIB dependency in system HDF5
Reason: VTK is not using targets and not accounting for a possible szip,zlib dependencies in a system HDF5
Solution:
Start using CMake targets.... Main reason you cannot use targets: Your load order for CMakeLists.txt is a mess ....
Problem: the cmake macro mess hiding how the load order is generated but I believe VTK_MODULES_ALL
and VTKModules.log
hint somehow at the load order and vtkhdf5
is behind the dependent libraries vtkIOAMR
and vtkIOVeraOut
. Seems like a call to topological_sort
is missing and VTKModules.log
should contain a correctly topologically sorted list which is currently not the case. (But I already sank enough time into this....so you have to figure out the rest)
Error:
Creating library lib\vtkIOAMR-8.2.lib and object lib\vtkIOAMR-8.2.exp
libhdf5_D.lib(H5Z.c.obj) : error LNK2019: unresolved external symbol SZ_encoder_enabled referenced in function H5Z__init_package
libhdf5_D.lib(H5Zdeflate.c.obj) : error LNK2019: unresolved external symbol inflate referenced in function H5Z_filter_deflate
libhdf5_D.lib(H5Zdeflate.c.obj) : error LNK2019: unresolved external symbol inflateEnd referenced in function H5Z_filter_deflate
libhdf5_D.lib(H5Zdeflate.c.obj) : error LNK2019: unresolved external symbol compress2 referenced in function H5Z_filter_deflate
libhdf5_D.lib(H5Zdeflate.c.obj) : error LNK2019: unresolved external symbol inflateInit_ referenced in function H5Z_filter_deflate
libhdf5_D.lib(H5Zszip.c.obj) : error LNK2019: unresolved external symbol SZ_BufftoBuffCompress referenced in function H5Z_filter_szip
libhdf5_D.lib(H5Zszip.c.obj) : error LNK2019: unresolved external symbol SZ_BufftoBuffDecompress referenced in function H5Z_filter_szip
bin\vtkIOAMR-8.2.dll : fatal error LNK1120: 7 unresolved externals
Link Line:
LINK Pass 1: command "C:\PROGRA~2\MIB055~1\2017\ENTERP~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe IO\AMR\CMakeFiles\vtkIOAMR.dir\vtkAMRBaseParticlesReader.cxx.obj IO\AMR\CMakeFiles\vtkIOAMR.dir\vtkAMRBaseReader.cxx.obj IO\AMR\CMakeFiles\vtkIOAMR.dir\vtkAMRDataSetCache.cxx.obj IO\AMR\CMakeFiles\vtkIOAMR.dir\vtkAMREnzoParticlesReader.cxx.obj IO\AMR\CMakeFiles\vtkIOAMR.dir\vtkAMREnzoReader.cxx.obj IO\AMR\CMakeFiles\vtkIOAMR.dir\vtkAMREnzoReaderInternal.cxx.obj IO\AMR\CMakeFiles\vtkIOAMR.dir\vtkAMReXParticlesReader.cxx.obj IO\AMR\CMakeFiles\vtkIOAMR.dir\vtkAMRFlashParticlesReader.cxx.obj IO\AMR\CMakeFiles\vtkIOAMR.dir\vtkAMRFlashReader.cxx.obj IO\AMR\CMakeFiles\vtkIOAMR.dir\vtkAMRFlashReaderInternal.cxx.obj /out:bin\vtkIOAMR-8.2.dll /implib:lib\vtkIOAMR-8.2.lib /pdb:bin\vtkIOAMR-8.2.pdb /dll /version:1.0 /machine:x64 /debug /INCREMENTAL lib\vtkFiltersAMR-8.2.lib lib\vtkParallelCore-8.2.lib G:\MPINew\mpi_vcpkg\installed\x64-windows-mpi\debug\lib\libhdf5_D.lib G:\MPINew\mpi_vcpkg\installed\x64-windows-mpi\debug\lib\libhdf5_hl_D.lib lib\vtkCommonExecutionModel-8.2.lib lib\vtkCommonDataModel-8.2.lib lib\vtkCommonTransforms-8.2.lib lib\vtkCommonSystem-8.2.lib lib\vtksys-8.2.lib ws2_32.lib Psapi.lib lib\vtkCommonMath-8.2.lib lib\vtkCommonCore-8.2.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:IO\AMR\CMakeFiles\vtkIOAMR.dir/intermediate.manifest IO\AMR\CMakeFiles\vtkIOAMR.dir/manifest.res"
edit: added zlib