I search the Internet and found add ITKAlgorithms in target_link_libraries may help.
But I got error say ITKAlgorithms.lib not found.
As the answer which tell me to use ITKAlgorithms is too old, so I want to know should I add ITKAlgorithms in cmakelist in itk5?
I use vcpkg to install itk, and they don’t tell me to add ITKAlgorithms(just ITKFFT ITKVTK ITKznz itksys)
WatershedImageFilter is part of ITKWatersheds module. ConnectedThresholdImageFilter is part of ITKRegionGrowing module. Make sure you specify these as dependencies in your project. How does you CMakeLists.txt look like?
1> [CMake] CMake Error at D:/cmake/vcpkg/scripts/buildsystems/vcpkg.cmake:537 (_add_executable):
1> [CMake] Target "Reconstruction" links to target "GTest::GTest" but the target was
1> [CMake] not found. Perhaps a find_package() call is missing for an IMPORTED
1> [CMake] target, or an ALIAS target is missing?
1> [CMake] Call Stack (most recent call first):
1> [CMake] CMakeLists.txt:43 (add_executable)
1> [CMake] CMake Error at D:/cmake/vcpkg/scripts/buildsystems/vcpkg.cmake:537 (_add_executable):
1> [CMake] Target "Reconstruction" links to target "GTest::Main" but the target was
1> [CMake] not found. Perhaps a find_package() call is missing for an IMPORTED
1> [CMake] target, or an ALIAS target is missing?
1> [CMake] Call Stack (most recent call first):
1> [CMake] CMakeLists.txt:43 (add_executable)
1> [CMake] -- Generating done
1> [CMake] CMake Generate step failed. Build files cannot be regenerated correctly.
I have install GTest and itk in vcpkg.
Is it an error that I should report to vcpkg?