Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking errors on Windows #37

Open
1 task done
ghisvail opened this issue Jun 20, 2023 · 0 comments
Open
1 task done

Linking errors on Windows #37

ghisvail opened this issue Jun 20, 2023 · 0 comments
Labels

Comments

@ghisvail
Copy link

Solution to issue cannot be found in the documentation.

  • I checked the documentation.

Issue

I am in the process of submitting a Conda package for ANTs, a medical image registration package based on ITK.

I managed to build a working package for Linux and macOS successfully, but I am unable to build it for Windows due to linking errors such as:

2023-06-03T20:49:24.5920686Z ITKOptimizers-5.3.lib(ITKOptimizers-5.3.dll) : error LNK2005: "protected: __cdecl itk::CostFunctionTemplate<double>::CostFunctionTemplate<double>(void)" (??0?$CostFunctionTemplate@N@itk@@IEAA@XZ) already defined in antsUtilities.lib(antsRegistration4DDouble.cxx.obj)
2023-06-03T20:49:24.5922719Z ITKOptimizers-5.3.lib(ITKOptimizers-5.3.dll) : error LNK2005: "protected: virtual __cdecl itk::CostFunctionTemplate<double>::~CostFunctionTemplate<double>(void)" (??1?$CostFunctionTemplate@N@itk@@MEAA@XZ) already defined in antsUtilities.lib(antsRegistration4DDouble.cxx.obj)
2023-06-03T20:49:24.5924701Z ITKOptimizers-5.3.lib(ITKOptimizers-5.3.dll) : error LNK2005: "protected: virtual void __cdecl itk::CostFunctionTemplate<double>::PrintSelf(class std::basic_ostream<char,struct std::char_traits<char> > &,class itk::Indent)const " (?PrintSelf@?$CostFunctionTemplate@N@itk@@MEBAXAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@VIndent@2@@Z) already defined in antsUtilities.lib(antsRegistration4DDouble.cxx.obj)
2023-06-03T20:49:38.3031489Z Examples\antsAffineInitializer.exe : fatal error LNK1169: one or more multiply defined symbols found

I am not familiar with the specificities of Windows builds. Could you help me figure out where the issue comes from (ITK, ANTS or their respective Conda packages)? Would you have any suggestions w.r.t. how to fix this?

Thank you in advance.

Installed packages

n/a

Environment info

n/a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant