MantisBT - ITK
View Issue Details
0006724ITKpublic2008-04-07 08:412009-07-30 10:06
Tom Vercauteren 
Bill Lorensen 
normalmajoralways
closedfixed 
 
 
0006724: ITK does not compile on mingw with BUILD_SHARED_LIBS set to ON
Building ITK on windows with mingw with BUILD_SHARED_LIBS set to ON (and BUILD_TESTING set to ON) leads to many linking errors of the type
"multiple definition of [...] vnl_[...]"
No tags attached.
duplicate of 0005647closed Luis Ibanez ITK with shared libs on does not compile under MinGW 
Issue History
2008-04-07 08:41Tom VercauterenNew Issue
2008-04-14 03:52Tom VercauterenNote Added: 0011273
2008-04-14 13:29Tomas KazmarNote Added: 0011285
2008-05-13 04:45Tom VercauterenRelationship addedduplicate of 0005647
2008-05-22 04:47Tom VercauterenNote Added: 0012064
2009-07-26 11:07Bill LorensenStatusnew => assigned
2009-07-26 11:07Bill LorensenAssigned To => Bill Lorensen
2009-07-30 08:01Bill LorensenNote Added: 0017018
2009-07-30 08:01Bill LorensenStatusassigned => feedback
2009-07-30 08:57Tom VercauterenNote Added: 0017020
2009-07-30 10:05Bill LorensenNote Added: 0017021
2009-07-30 10:05Bill LorensenStatusfeedback => resolved
2009-07-30 10:05Bill LorensenResolutionopen => fixed
2009-07-30 10:06Bill LorensenNote Added: 0017022
2009-07-30 10:06Bill LorensenStatusresolved => closed

Notes
(0011273)
Tom Vercauteren   
2008-04-14 03:52   
Just realized that this bug is a duplicate of bug # 5647
(0011285)
Tomas Kazmar   
2008-04-14 13:29   
Yes, it is a duplicate.

Building ITK with shared libs on MinGW has been broken for a long time now. The last patch fixes the linker errors (unresolved symbols) for some executables, unfortunately not for itkTestDriver (it introduces the error you report), if I recall well. Currently, not using shared libs on MinGW is the way to go.
(0012064)
Tom Vercauteren   
2008-05-22 04:47   
Apparently, the same problem appears on cygwin
(0017018)
Bill Lorensen   
2009-07-30 08:01   
Try updating to CMake 2.6.4. We have a cygwin and mingw nightlies building with shared libraries. I also build mingw shared on my system. There were changes made to cmake to explicitly resolve this issue.
(0017020)
Tom Vercauteren   
2009-07-30 08:57   
Thank you Bill. I am not working with cygwin and mingw anymore right now but will try cmake 2.6.4 if I do.

It is OK to close this bug from my side.
(0017021)
Bill Lorensen   
2009-07-30 10:05   
An update to cmake 2.6.4 resolves the problem.
(0017022)
Bill Lorensen   
2009-07-30 10:06   
The reporter OKed the closing of the bug.