Built ITK 5.2.1 with Module SkullStrip - Multiple defined symbols error


I built ITK 5.2.1 with the SkullStrip module enabled. When I try to use the itkStripTsImageFilter class, I get an “one or more multiply defined symbols found” error.

|Error|LNK1169|one or more multiply defined symbols.

|Error|LNK2005|protected: virtual void __cdecl itk::CostFunctionTemplate::PrintSelf(class std::basic_ostream<char,struct std::char_traits > &,class itk::Indent)const (?PrintSelf?$CostFunctionTemplateNitkMEBAXAEAV?$basic_ostreamDU?$char_traitsDstdstdVIndent2Z) already defined in …\ITKOptimizers-5.2.lib(ITKOptimizers-5.2.dll)|1||

I am using the code from this example:

All other classes and external modules (e.g. Module_Cuberille, Module_MGHIO, …) are working.

Anything I am missing? Can anyone tell me an ITK version for which this filter is working?

Thank you!

This seems more like a problem with your ITK build than SkullStrip module. If you were doing incremental builds, try a clean build. If this is a fresh build, please provide a complete build log for the example.