Hi Matt,<div><br></div><div>Thanks for attention. Yes of course I built all needed library. It is weird as when I was back to ITKv3.20.1 the link 2005 error disappeared-_-!</div><div><br></div><div>Best,</div><div>Zhicheng<br><br><br><span></span><br><blockquote style="padding-left:5px;margin-left:5px;border-left:#a0c6e5 2px solid;margin-right:0">-----Original Messages-----<br>
<b>From:</b> "Matt McCormick" <matt.mccormick@kitware.com><br>
<b>Sent Time:</b> Wednesday, January 11, 2012<br>
<b>To:</b> "Li Zhi-Cheng" <zc.li@siat.ac.cn><br>
<b>Cc:</b> <br>
<b>Subject:</b> Re: [Insight-users] weird link error 2005 when using ITKv4<br><br><p>Hi Zhicheng,</p>
<p>Are you making a convenience library that has ITK and trying to built shared libraries under Windows? That situation is known to have issues with export symbol specification at this time. The workaround is to built static libraries at the moment.</p>
<p>Thanks,<br>
Matt</p>
<div class="gmail_quote">On Jan 11, 2012 7:17 AM, "Li Zhi-Cheng" <<a href="mailto:zc.li@siat.ac.cn">zc.li@siat.ac.cn</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="ZH-CN" link="blue" vlink="purple"><div><p class="MsoNormal"><span lang="EN-US">Hi all,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">I am using ITKv4 in my project. After generating the solution using CMake, I built it but met an weird link error as follow:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">2>ITKNrrdIO-4.0.lib(miscAir.obj) : error LNK2005: _itk_airFree already defined in FtkThinning.lib(FtkThinning.dll)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">2>ITKNrrdIO-4.0.lib(simple.obj) : error LNK2005: _itk_nrrdSpaceDimension already defined in FtkThinning.lib(FtkThinning.dll)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">2>ITKNrrdIO-4.0.lib(simple.obj) : error LNK2005: _itk_nrrdSpaceSet already defined in FtkThinning.lib(FtkThinning.dll)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">2>ITKNrrdIO-4.0.lib(simple.obj) : error LNK2005: _itk_nrrdSpaceDimensionSet already defined in FtkThinning.lib(FtkThinning.dll)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">2>ITKNrrdIO-4.0.lib(simple.obj) : error LNK2005: _itk_nrrdSpaceOriginSet already defined in FtkThinning.lib(FtkThinning.dll)<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">¡¡..<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Followed by tons of similar errors. I am not sure what occurred? <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thanks!<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal">
<span lang="EN-US">Best regards,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Zhicheng<u></u><u></u></span></p></div></div><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div>
</blockquote></div><br><br>