<br>Hi Xiaofeng,<br><br>It is now possible to build ITK with Visual Studio 10.<br><br><br> Thanks a lot for contributing your fixes !<br><br><br> This was a great example of<br> the power of Open Source at work ! :-)<br>
<br><br>The relevant commits are the following:<br><br><a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itk_hashtable.h?root=Insight&r1=1.34&r2=1.35&sortby=date">http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itk_hashtable.h?root=Insight&r1=1.34&r2=1.35&sortby=date</a><br>
<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkMacro.h?root=Insight&r1=1.100&r2=1.101&sortby=date">http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkMacro.h?root=Insight&r1=1.100&r2=1.101&sortby=date</a><br>
<a href="http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkMesh.txx?root=Insight&r1=1.104&r2=1.105&sortby=date">http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkMesh.txx?root=Insight&r1=1.104&r2=1.105&sortby=date</a><br>
<br><br>The first green Experimental build from a Visual Studio 10 <br>build has been posted to the ITK Dashboard at:<br><br><a href="http://www.cdash.org/CDash/buildSummary.php?buildid=595426">http://www.cdash.org/CDash/buildSummary.php?buildid=595426</a><br>
<br><br>Please update your CVS Checkout of ITK,<br>in order to get the working version.<br><br><br>Note that they are not yet the "correct" way of providing <br>support for Visual Studio 10. In particular, the statements<br>
<br> #if defined( MSC_VER) ....<br><br>should be replaced by the proper TRY_COMPILE <br>equivalents.<br><br>We will be cleaning this up in the following days,<br>and moving the checks to the try_compile files in<br>
<br>Insight/CMake/<br> itkTestFriendTemplatedFunction.cxx<br> itkTestFriendTemplatedFunction.cmake<br><br><br><br>However, <br>in the meantime, you can start using ITK<br>with Visual Studio 10 :-)<br><br>
<br> Please let us know if you find any issues.<br><br><br>We will let this marinate in the Dashboard for <br>a couple of days before we apply a patch to the<br>ITK 3.18 branch.<br><br><br><br> Thanks<br><br><br> Luis<br>
<br><br><br>---------------------------------------------------<br><div class="gmail_quote">On Thu, Apr 22, 2010 at 3:47 PM, Luis Ibanez <span dir="ltr"><<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>Hi Xiaofeng,<br><br><br> Thanks for sharing your findings.<br><br>Yes, you are in the right track.<br>
<br>We are trying to figure our what will be the <br>right definition of this macro (and others).<br><br>So far, we have finding that we need to add<br>
some<br><br> #ifdef (_MSC_VER < 1600 )<br> <br> #else<br> // Code for VS 10<br> #endif<br><br>mostly for the lines that you are commenting<br>out in itk_hashtable.h<br><br><br> Thanks<br><br>
<br>
Luis<br><br><br>--------------------------------------------------------------<div><div></div><div class="h5"><br><div class="gmail_quote">On Thu, Apr 22, 2010 at 2:59 PM, Xiaofeng Z <span dir="ltr"><<a href="mailto:xf10036@hotmail.com" target="_blank">xf10036@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I was able to derive a workaround to get ITK to compile by VS 2010. This involves changing a few source code files:<br>
<br>
1. add "#define ITK_SUPPORTS_TEMPLATED_FRIEND_FUNCTION_WITH_NULL_STRING" in "itkMacro.h" before line 750<br>
<br>
2. comment out line 1148-1155 in file "itk_hashtable.h"<br>
<br>
3. add "#include <iterator>" to "itkMesh.txx"<br>
<br>
Hope this helps!<br>
<br>
<br>
Xiaofeng Z<br>
<br>
<br>
<br>
<br>
________________________________<br>
> Date: Thu, 22 Apr 2010 11:15:40 -0400<br>
> Subject: Re: [Insight-users] building itk using visual studio 2010<br>
> From: <a href="mailto:luis.ibanez@kitware.com" target="_blank">luis.ibanez@kitware.com</a><br>
> To: <a href="mailto:xf10036@hotmail.com" target="_blank">xf10036@hotmail.com</a><br>
> CC: <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a>; <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>
<div>><br>
><br>
> Hi Xiaofeng,<br>
><br>
> We are setting up a Nightly build of ITK with Visual Studio 10,<br>
> that will post to the ITK Dashboard.<br>
><br>
> <a href="http://www.cdash.org/CDash/index.php?project=Insight" target="_blank">http://www.cdash.org/CDash/index.php?project=Insight</a><br>
><br>
><br>
> That will help us ensure that VS10 is supported, and that<br>
> it remains supported on a permanent basis.<br>
><br>
><br>
> Stay tunned....<br>
><br>
><br>
> Regards,<br>
><br>
><br>
> Luis<br>
><br>
><br>
> --------------------------------------------------------------------<br>
><br>
</div><div><div></div><div>> On Thu, Apr 22, 2010 at 10:59 AM, Xiaofeng Z> wrote:<br>
><br>
><br>
><br>
><br>
><br>
> Is there any workaround before a permanent solution is worked out?<br>
><br>
><br>
><br>
><br>
><br>
> Xiaofeng Z<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> ----------------------------------------<br>
><br>
>> CC: <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>
><br>
>> From: <a href="mailto:mike.jackson@bluequartz.net" target="_blank">mike.jackson@bluequartz.net</a><br>
><br>
>> To: <a href="mailto:xf10036@hotmail.com" target="_blank">xf10036@hotmail.com</a><br>
><br>
>> Subject: Re: [Insight-users] (no subject)<br>
><br>
>> Date: Thu, 22 Apr 2010 10:15:08 -0400<br>
><br>
>><br>
><br>
>> It seems that ITK 3.18 will NOT compile against VS 2010:<br>
><br>
>><br>
><br>
>> From an April 19, 2010 Posting to this list from Luis Ibanez<br>
><br>
>>> Hi Mostafizur,<br>
><br>
>>><br>
><br>
>>><br>
><br>
>>> ITK (any version) does not support Visual Studio 10 yet.<br>
><br>
>>><br>
><br>
>>><br>
><br>
>>> There were some structural changes made to Visual Studio 10,<br>
><br>
>>> that require CMake to manage the configuration process in a<br>
><br>
>>> way different from what is done with Visual Studio 9.<br>
><br>
>>><br>
><br>
>>><br>
><br>
>>> We will have Visual Studio 10 support for ITK in our top priorities<br>
><br>
>>> for the development cycle of ITK 3.19.<br>
><br>
>>><br>
><br>
>>><br>
><br>
>>><br>
><br>
>>> Regards,<br>
><br>
>>><br>
><br>
>>><br>
><br>
>>> Luis<br>
><br>
>><br>
><br>
>> --<br>
><br>
>> Mike J.<br>
><br>
>><br>
><br>
>> On Apr 22, 2010, at 10:01 AM, Xiaofeng Z wrote:<br>
><br>
>><br>
><br>
>>><br>
><br>
>>><br>
><br>
>>> Anyone able to compile itk in Visual Studio 2010? I'm getting large<br>
><br>
>>> amount of errors. The first one is:<br>
><br>
>>><br>
><br>
>>><br>
><br>
>>> 50>d:\nyph\imaging\source\insighttoolkit-3.18.0\code\common<br>
><br>
>>> \itk_hashtable.h(474): error C2146: syntax error : missing ';'<br>
><br>
>>> before identifier 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'<br>
><br>
>>><br>
><br>
>>><br>
><br>
>>> Is there anything I need to change in CMake? The only thing I<br>
><br>
>>> changed was to turn on BUILD_SHARED_LIBS.<br>
><br>
>>><br>
><br>
>>> Thanks!<br>
><br>
>>><br>
><br>
>>><br>
><br>
>>> Xiaofeng Z<br>
><br>
>>> _________________________________________________________________<br>
><br>
>>> The New Busy is not the old busy. Search, chat and e-mail from your<br>
><br>
>>> inbox.<br>
><br>
>>> <a href="http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3" target="_blank">http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3</a><br>
><br>
><br>
>>> _____________________________________<br>
><br>
>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
>>><br>
><br>
>>> Visit other Kitware open-source projects at<br>
><br>
>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
>>><br>
><br>
>>> Kitware offers ITK Training Courses, for more information visit:<br>
><br>
>>> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
>>><br>
><br>
>>> Please keep messages on-topic and check the ITK FAQ at:<br>
><br>
>>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
>>><br>
><br>
>>> Follow this link to subscribe/unsubscribe:<br>
><br>
>>> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
>><br>
><br>
> _________________________________________________________________<br>
><br>
> The New Busy is not the old busy. Search, chat and e-mail from your inbox.<br>
><br>
> <a href="http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3" target="_blank">http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3</a><br>
><br>
><br>
> _____________________________________<br>
><br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
><br>
><br>
> Visit other Kitware open-source projects at<br>
><br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
><br>
> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
><br>
><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
><br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
><br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
><br>
</div></div><div>_________________________________________________________________<br>
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.<br>
<a href="http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2" target="_blank">http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2</a></div>
</blockquote></div><br>
</div></div></blockquote></div><br>