<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>--------------------------------------------------------------<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">xf10036@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); 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">luis.ibanez@kitware.com</a><br>
> To: <a href="mailto:xf10036@hotmail.com">xf10036@hotmail.com</a><br>
> CC: <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>; <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>
<div class="im">><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 class="h5">> 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">insight-users@itk.org</a><br>
><br>
>> From: <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a><br>
><br>
>> To: <a href="mailto:xf10036@hotmail.com">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 class="hm">_________________________________________________________________<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>