ITK: GPUDenseFiniteDifferenceImageFilter does not compile as shared library
A compile error occurs with both GPU and SHARED enabled. Example error message:
itkGPUGradientAnisotropicDiffusionImageFilterTest.obj : error LNK2019: unresolved external symbol "public: static char const * __cdecl itk::GPUDenseFiniteDifferenceImageFilterKernel::GetOpenCLSource(void)" (?GetOpenCLSource@GPUDenseFiniteDifferenceImageFilterKernel@itk@@SAPEBDXZ) referenced in function "public: static char const * __cdecl itk::GPUDenseFiniteDifferenceImageFilter<class itk::GPUImage<float,2>,class itk::GPUImage<float,2>,class itk::GradientAnisotropicDiffusionImageFilter<class itk::GPUImage<float,2>,class itk::GPUImage<float,2> > >::GetOpenCLSource(void)" (?GetOpenCLSource@?$GPUDenseFiniteDifferenceImageFilter@V?$GPUImage@M$01@itk@@V12@V?$GradientAnisotropicDiffusionImageFilter@V?$GPUImage@M$01@itk@@V12@@2@@itk@@SAPEBDXZ)
This problem was introduced by 4fe3b5de74c6114e907747758746b3c4ea4406ff.
Steps to Reproduce
Turn on BUILD_SHARED_LIBS and ITK_USE_GPU during configure step.
Reproducibility
100%
Environment
Windows 10 x64, VS2019 & VS2017 (probably VS2015 too), multiple recent CMake versions.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (13 by maintainers)
Commits related to this issue
- COMP: fix GPU compile errors when building as DLLs Patch proposed by @Neumann-A. Closes #1381. — committed to dzenanz/ITK by dzenanz 4 years ago
- COMP: fix GPU compile errors when building as DLLs Patch proposed by @Neumann-A. Closes #1381. — committed to dzenanz/ITK by dzenanz 4 years ago
- COMP: fix GPU compile errors when building as DLLs Patch proposed by @Neumann-A. Closes #1381. — committed to dzenanz/ITK by dzenanz 4 years ago
- COMP: fix GPU compile errors when building as DLLs Patch proposed by @Neumann-A. Closes #1381. — committed to InsightSoftwareConsortium/ITK by dzenanz 4 years ago
- COMP: fix GPU compile errors when building as DLLs Patch proposed by @Neumann-A. Closes #1381. — committed to jond01/ITK by dzenanz 4 years ago
- Add optional patch for ITK 5.1 GPU/shared lib conflicts (from https://github.com/InsightSoftwareConsortium/ITK/issues/1381) — committed to 3dct/open_iA-superbuild by codeling 4 years ago
@dzenanz please try this patch: python_gpu_wrapping.patch.txt
I got to 4355 of 4379 with it and hit and RTK related problem. FAILED:
Wrapping/Modules/RTK/CMakeFiles/RTKPython.dir/rtkMechlemOneStepSpectralReconstructionFilterPython.cpp.obj