<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi Luis,<BR>
&nbsp;<BR>
This is slightly off-topic.&nbsp; I was also toying with a quick fix/work around with VTK.&nbsp; My finding is that the quickest way to get VTK to work under VS2010 is to comment out VTK_COMMON_EXPORT as the following in the file, of course, "vtkArrayIteratorTemplate.h"&nbsp;<BR>
&nbsp;<BR><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas>
template</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas> &lt;</FONT></FONT><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas>class</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas> T&gt;<BR></FONT></FONT><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas>
class</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas> </FONT></FONT><FONT color=#008000 size=2 face=Consolas><FONT color=#008000 size=2 face=Consolas><FONT color=#008000 size=2 face=Consolas>/*VTK_COMMON_EXPORT*/</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas> vtkArrayIteratorTemplate : </FONT></FONT><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas><FONT color=#0000ff size=2 face=Consolas>public</FONT></FONT></FONT><FONT size=2 face=Consolas><FONT size=2 face=Consolas> vtkArrayIterator<BR></FONT></FONT>
<BR>My&nbsp;suspection is that&nbsp;this class was never been properly exported.<BR>
<BR>Xiaofeng<BR><BR><BR>&nbsp;<BR>
<HR id=stopSpelling>
Date: Thu, 22 Apr 2010 15:47:32 -0400<BR>Subject: Re: [Insight-users] building itk using visual studio 2010<BR>From: luis.ibanez@kitware.com<BR>To: xf10036@hotmail.com<BR>CC: mike.jackson@bluequartz.net; insight-users@itk.org<BR><BR><BR>Hi Xiaofeng,<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp; &nbsp; #ifdef (_MSC_VER &lt; 1600 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; #else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Code for VS 10<BR>&nbsp;&nbsp;&nbsp; #endif<BR><BR>mostly for the lines that you are commenting<BR>out in itk_hashtable.h<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks<BR><BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Luis<BR><BR><BR>--------------------------------------------------------------<BR>
<DIV class=ecxgmail_quote>On Thu, Apr 22, 2010 at 2:59 PM, Xiaofeng Z <SPAN dir=ltr>&lt;<A href="mailto:xf10036@hotmail.com">xf10036@hotmail.com</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE style="PADDING-LEFT: 1ex" class=ecxgmail_quote><BR>I was able to derive a workaround to get ITK to compile by VS 2010. &nbsp;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 &lt;iterator&gt;" to "itkMesh.txx"<BR><BR>Hope this helps!<BR><BR><BR>Xiaofeng Z<BR><BR><BR><BR><BR>________________________________<BR>&gt; Date: Thu, 22 Apr 2010 11:15:40 -0400<BR>&gt; Subject: Re: [Insight-users] building itk using visual studio 2010<BR>&gt; From: <A href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</A><BR>&gt; To: <A href="mailto:xf10036@hotmail.com">xf10036@hotmail.com</A><BR>&gt; 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=ecxim>&gt;<BR>&gt;<BR>&gt; Hi Xiaofeng,<BR>&gt;<BR>&gt; We are setting up a Nightly build of ITK with Visual Studio 10,<BR>&gt; that will post to the ITK Dashboard.<BR>&gt;<BR>&gt; <A href="http://www.cdash.org/CDash/index.php?project=Insight">http://www.cdash.org/CDash/index.php?project=Insight</A><BR>&gt;<BR>&gt;<BR>&gt; That will help us ensure that VS10 is supported, and that<BR>&gt; it remains supported on a permanent basis.<BR>&gt;<BR>&gt;<BR>&gt; Stay tunned....<BR>&gt;<BR>&gt;<BR>&gt; Regards,<BR>&gt;<BR>&gt;<BR>&gt; Luis<BR>&gt;<BR>&gt;<BR>&gt; --------------------------------------------------------------------<BR>&gt;<BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>&gt; On Thu, Apr 22, 2010 at 10:59 AM, Xiaofeng Z&gt; wrote:<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; Is there any workaround before a permanent solution is worked out?<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; Xiaofeng Z<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; ----------------------------------------<BR>&gt;<BR>&gt;&gt; CC: <A href="mailto:insight-users@itk.org">insight-users@itk.org</A><BR>&gt;<BR>&gt;&gt; From: <A href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</A><BR>&gt;<BR>&gt;&gt; To: <A href="mailto:xf10036@hotmail.com">xf10036@hotmail.com</A><BR>&gt;<BR>&gt;&gt; Subject: Re: [Insight-users] (no subject)<BR>&gt;<BR>&gt;&gt; Date: Thu, 22 Apr 2010 10:15:08 -0400<BR>&gt;<BR>&gt;&gt;<BR>&gt;<BR>&gt;&gt; It seems that ITK 3.18 will NOT compile against VS 2010:<BR>&gt;<BR>&gt;&gt;<BR>&gt;<BR>&gt;&gt; From an April 19, 2010 Posting to this list from Luis Ibanez<BR>&gt;<BR>&gt;&gt;&gt; Hi Mostafizur,<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; ITK (any version) does not support Visual Studio 10 yet.<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; There were some structural changes made to Visual Studio 10,<BR>&gt;<BR>&gt;&gt;&gt; that require CMake to manage the configuration process in a<BR>&gt;<BR>&gt;&gt;&gt; way different from what is done with Visual Studio 9.<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; We will have Visual Studio 10 support for ITK in our top priorities<BR>&gt;<BR>&gt;&gt;&gt; for the development cycle of ITK 3.19.<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; Regards,<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; Luis<BR>&gt;<BR>&gt;&gt;<BR>&gt;<BR>&gt;&gt; --<BR>&gt;<BR>&gt;&gt; Mike J.<BR>&gt;<BR>&gt;&gt;<BR>&gt;<BR>&gt;&gt; On Apr 22, 2010, at 10:01 AM, Xiaofeng Z wrote:<BR>&gt;<BR>&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; Anyone able to compile itk in Visual Studio 2010? I'm getting large<BR>&gt;<BR>&gt;&gt;&gt; amount of errors. The first one is:<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; 50&gt;d:\nyph\imaging\source\insighttoolkit-3.18.0\code\common<BR>&gt;<BR>&gt;&gt;&gt; \itk_hashtable.h(474): error C2146: syntax error : missing ';'<BR>&gt;<BR>&gt;&gt;&gt; before identifier 'ITK_FRIEND_TEMPLATE_FUNCTION_ARGUMENT'<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; Is there anything I need to change in CMake? The only thing I<BR>&gt;<BR>&gt;&gt;&gt; changed was to turn on BUILD_SHARED_LIBS.<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; Thanks!<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; Xiaofeng Z<BR>&gt;<BR>&gt;&gt;&gt; _________________________________________________________________<BR>&gt;<BR>&gt;&gt;&gt; The New Busy is not the old busy. Search, chat and e-mail from your<BR>&gt;<BR>&gt;&gt;&gt; inbox.<BR>&gt;<BR>&gt;&gt;&gt; <A href="http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3">http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3</A><BR>&gt;<BR>&gt;<BR>&gt;&gt;&gt; _____________________________________<BR>&gt;<BR>&gt;&gt;&gt; Powered by <A href="http://www.kitware.com/">www.kitware.com</A><BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; Visit other Kitware open-source projects at<BR>&gt;<BR>&gt;&gt;&gt; <A href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; Kitware offers ITK Training Courses, for more information visit:<BR>&gt;<BR>&gt;&gt;&gt; <A href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</A><BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<BR>&gt;<BR>&gt;&gt;&gt; <A href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</A><BR>&gt;<BR>&gt;&gt;&gt;<BR>&gt;<BR>&gt;&gt;&gt; Follow this link to subscribe/unsubscribe:<BR>&gt;<BR>&gt;&gt;&gt; <A href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR>&gt;<BR>&gt;&gt;<BR>&gt;<BR>&gt; _________________________________________________________________<BR>&gt;<BR>&gt; The New Busy is not the old busy. Search, chat and e-mail from your inbox.<BR>&gt;<BR>&gt; <A href="http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3">http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3</A><BR>&gt;<BR>&gt;<BR>&gt; _____________________________________<BR>&gt;<BR>&gt; Powered by <A href="http://www.kitware.com/">www.kitware.com</A><BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; Visit other Kitware open-source projects at<BR>&gt;<BR>&gt; <A href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; Kitware offers ITK Training Courses, for more information visit:<BR>&gt;<BR>&gt; <A href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</A><BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; Please keep messages on-topic and check the ITK FAQ at:<BR>&gt;<BR>&gt; <A href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</A><BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; Follow this link to subscribe/unsubscribe:<BR>&gt;<BR>&gt; <A href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR>&gt;<BR>&gt;<BR></DIV></DIV>
<DIV class=ecxhm>_________________________________________________________________<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">http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2</A></DIV></BLOCKQUOTE></DIV><BR>                                               <br /><hr />Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. <a href='http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2' target='_new'>See how.</a></body>
</html>