<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>&nbsp;</DIV>
<DIV>I built VTK 5.2.1 from source with VS 2008 Pro Edition and found vtkMFCConfigure.h in the following two folders:</DIV>
<DIV>&nbsp;</DIV>
<DIV>1) MyBuildDir\GUISupport\MFC\</DIV>
<DIV>2) CMAKE_INSTALL_PREFIX\include\vtk-5.2\</DIV>
<DIV>&nbsp;</DIV>
<DIV>I configured vtk source in CMake 2.6.2 with both VTK_USE_GUISupport and VTK_Use_MFC on. I also had VTK_USE_QT on. I built the binary from VTK.sln by building ALL_BUILD project and then building INSTALL project. It was an error-free process after commenting out a few lines pointed out by David (see below).</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>--- On <B>Wed, 2/4/09, Alon Mozes <I>&lt;amozes77@yahoo.com&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Alon Mozes &lt;amozes77@yahoo.com&gt;<BR>Subject: Re: [vtkusers] Compile with Visual Studio 2008<BR>To: "David Cole" &lt;david.cole@kitware.com&gt;<BR>Cc: vtkusers@vtk.org<BR>Date: Wednesday, February 4, 2009, 11:51 AM<BR><BR>
<DIV id=yiv1844500962>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>Sorry, I think I had missed both Michael's and Arturo's posts (Should I not be expecting an email response or notification of response?&nbsp; No sign of a reply in any junk folder either or even in the digests.&nbsp; Maybe I'm doing something stupid with my multiple email addresses...).&nbsp; I've found the posts&nbsp;online through markmail and will try to address them...</DIV>
<DIV>&nbsp;</DIV>
<DIV>Michael,</DIV>
<DIV>I did build VTK myself.&nbsp; To be clear: I download the source, use CMake to configure it by pointing to the source folder and creating a new build folder, and then compile in Visual Studio using the solution file I find in that newly&nbsp;populated&nbsp;build directory.&nbsp; I found no sign of vtkMFCConfigure.h anywhere.&nbsp; From what I understand, I think this is a bug in the vtk installation code.</DIV>
<DIV>&nbsp;</DIV>
<DIV>The only trick is that I changed one vtk MFC file to get VTK to compile (that winver bug; see the origin of this thread) and then recompiled.&nbsp; I don't imagine that affected this problem.&nbsp; I am currently not at my dev machine, but when I get back, I can try from scratch with downloading vtk, configuring in CMake, making the change for that winver bug, and compiling in VS and seeing if that file exists (or&nbsp;I guess it should&nbsp;exist immediately after the CMake stage?).</DIV>
<DIV>&nbsp;</DIV>
<DIV>Arturo, </DIV>
<DIV>Thanks, that was my original concern.&nbsp; I'd still like to use VS from start to finish if I can since I'm more familiar with it, but I'm glad to know it should be a minor change if I can't get this working.</DIV>
<DIV>&nbsp;</DIV>
<DIV>David, </DIV>
<DIV>Long story short, if I understand right, either that file exists and I'm not properly pointing to it in my project settings, or it doesn't exist and it's&nbsp;a vtk bug.&nbsp; I'm pretty sure it doesn't exist (I recall searching my entire hard drive for it and came up with nothing; I can double check tonight).</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks again for all the help.<BR><BR>--- On <B>Wed, 2/4/09, David Cole <I>&lt;david.cole@kitware.com&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: David Cole &lt;david.cole@kitware.com&gt;<BR>Subject: Re: [vtkusers] Compile with Visual Studio 2008<BR>To: "Alon Mozes" &lt;amozes77@yahoo.com&gt;<BR>Cc: vtkusers@vtk.org, "Jim" &lt;jiksed@yahoo.com&gt;<BR>Date: Wednesday, February 4, 2009, 9:15 AM<BR><BR>
<DIV id=yiv1336885934>Using CMake is not *required*, it is simply strongly recommended because it avoids problems exactly like you are seeing right now. 
<DIV><BR></DIV>
<DIV>All you need to do is add an include directory so that Visual Studio can find the file it's looking for.<BR>
<DIV><BR></DIV>
<DIV>As Mike Jackson pointed out, though, if you're using an install tree of VTK and the file is not actually installed, then you've found a bug in VTK's install rules. Please let us know if that's the case, so we can fix it....</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV>Thanks,</DIV>
<DIV>David Cole</DIV>
<DIV><BR><BR>
<DIV class=gmail_quote>On Wed, Feb 4, 2009 at 11:26 AM, Alon Mozes <SPAN dir=ltr>&lt;<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>I've read a bit more about using CMake, and if I understand correctly, we would have to re-run CMake only when we change our project settings, not every time we build as I mistakenly said before.&nbsp; This is less painful than what I'd thought, but still more difficult than I'd like as project settings do change from time to time and we're now incorporating an extra application on a semi-regular basis.&nbsp; I'm very accustomed to dealing with the VS project settings format and am a total newbie to the CMake lists.&nbsp; If you insist that CMake is required to getting the project to work, I will invest the effort.&nbsp; Otherwise, I would prefer to simply tweak what was an already perfectly functioning project.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks for the advice. 
<DIV class=Ih2E3d><BR><BR>--- On <B>Wed, 2/4/09, David Cole <I>&lt;<A href="mailto:david.cole@kitware.com" target=_blank rel=nofollow>david.cole@kitware.com</A>&gt;</I></B> wrote:<BR></DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">
<DIV class=Ih2E3d>From: David Cole &lt;<A href="mailto:david.cole@kitware.com" target=_blank rel=nofollow>david.cole@kitware.com</A>&gt;<BR>Subject: Re: [vtkusers] Compile with Visual Studio 2008<BR>To: "Alon Mozes" &lt;<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>&gt;<BR>Cc: <A href="mailto:vtkusers@vtk.org" target=_blank rel=nofollow>vtkusers@vtk.org</A>, "Jim" &lt;<A href="mailto:jiksed@yahoo.com" target=_blank rel=nofollow>jiksed@yahoo.com</A>&gt;<BR></DIV>
<DIV class=Ih2E3d>Date: Wednesday, February 4, 2009, 3:45 AM<BR><BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>
<DIV>Are you using CMake to build your project?<BR><BR>The file vtkMFCConfigure.h is in your VTK build tree. If you are using CMake to build your project with find_package(VTK) and include(${VTK_USE_FILE}) then it should just work....<BR><BR>If you're not using CMake, I would recommend using it for your VTK dependent projects. It's much easier. It's probably just a matter of adding extra include directories for non-CMake-based projects.<BR><BR><BR>HTH,<BR>David<BR><BR><BR>
<DIV class=gmail_quote>On Tue, Feb 3, 2009 at 9:15 PM, Alon Mozes <SPAN dir=ltr>&lt;<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD style="FONT-FAMILY: inherit; font-size-adjust: inherit; font-stretch: inherit" vAlign=top>
<DIV>Maybe I spoke too soon...</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm able to compile VTK now without complaints about MFC.&nbsp; However, now I try to compile my application and I get an error:</DIV>
<DIV>&nbsp;</DIV><FONT size=1>
<DIV>1&gt;C:\Program Files\Vtk-5.2.1-src\GUISupport\MFC\vtkMFCWindow.h(24) : fatal error C1083: Cannot open include file: 'vtkMFCConfigure.h': No such file or directory</DIV>
<DIV></DIV></FONT>&nbsp; 
<DIV>I include vtkMFCWindow.h in one of my own project header files, and that in turn includes vtkMFCConfigure.h, but I can't find that file anywhere (I do find a <A href="http://vtkmfcconfigure.h.in/" target=_blank rel=nofollow>vtkMFCConfigure.h.in</A> in the vtk source folder).&nbsp; I am using VTK 5.2.1.&nbsp; I checked the previous version I was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include vtkMFCConfigure.h.&nbsp; Instead, it includes vtkConfigure.h, so this seems to be a new change.&nbsp; Any idea what I'm doing wrong?&nbsp; I notice there's an MFC&nbsp;project setting for compiling using Standard Windows, MFC in a shared dll, and MFC in a static library.&nbsp; This setting is available for both the VTK ALL_BUILD project as well as my own.&nbsp; I've tried using standard windows and static library with both with no luck.&nbsp; Maybe this setting matters somehow?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Any help would be greatly appreciated.&nbsp; Thanks.</DIV>
<DIV>
<DIV><BR><BR>--- On <B>Mon, 2/2/09, David Cole <I>&lt;<A href="mailto:david.cole@kitware.com" target=_blank rel=nofollow>david.cole@kitware.com</A>&gt;</I></B> wrote:<BR></DIV></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: David Cole &lt;<A href="mailto:david.cole@kitware.com" target=_blank rel=nofollow>david.cole@kitware.com</A>&gt; 
<DIV><BR>Subject: Re: [vtkusers] Compile with Visual Studio 2008<BR>To: "Alon Mozes" &lt;<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>&gt;<BR></DIV>
<DIV>Cc: <A href="mailto:vtkusers@vtk.org" target=_blank rel=nofollow>vtkusers@vtk.org</A>, "Jim" &lt;<A href="mailto:jiksed@yahoo.com" target=_blank rel=nofollow>jiksed@yahoo.com</A>&gt;<BR>Date: Monday, February 2, 2009, 4:28 AM<BR><BR></DIV>
<DIV>
<DIV></DIV>
<DIV>
<DIV>Did you not see my response to this thread the other day....?<BR><BR><BR>&nbsp; The first three lines of vtkMFCWindow.cpp are the culprit. They read: 
<DIV><BR></DIV>
<DIV>&nbsp; #ifndef WINVER &nbsp; &nbsp;// Allow use of features specific to Windows 95 and Windows NT 4 or later.</DIV>
<DIV>&nbsp; #define WINVER 0x0400</DIV>
<DIV>&nbsp; #endif</DIV>
<DIV><BR></DIV>
<DIV>&nbsp; Remove them or comment them out and it should work ok with VS2008.</DIV>
<DIV><BR></DIV>
<DIV>&nbsp; Sorry for the inconvenience....</DIV>
<DIV><BR></DIV>
<DIV><BR></DIV>
<DIV>HTH,</DIV>
<DIV>David<BR><BR><BR></DIV><BR><BR>
<DIV class=gmail_quote>On Sun, Feb 1, 2009 at 11:27 PM, Alon Mozes <SPAN dir=ltr>&lt;<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD style="FONT-FAMILY: inherit; font-size-adjust: inherit; font-stretch: inherit" vAlign=top>
<DIV>Not sure why I had to disable video for windows.&nbsp; I just know that I compiled and many errors seems to come from a conflict there (with the vtk rendering lib if I remember correctly).&nbsp; I got rid of that and still have one problem with the MFC lib which I know I need.&nbsp; Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag?&nbsp; Is this a problem with my Windows settings somehow?&nbsp; My Visual Studio settings?&nbsp; Or VTK?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks,</DIV>
<DIV>Alon<BR><BR>--- On <B>Thu, 1/29/09, Jim <I>&lt;<A href="mailto:jiksed@yahoo.com" target=_blank rel=nofollow>jiksed@yahoo.com</A>&gt;</I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Jim &lt;<A href="mailto:jiksed@yahoo.com" target=_blank rel=nofollow>jiksed@yahoo.com</A>&gt; 
<DIV><BR>Subject: Re: [vtkusers] Compile with Visual Studio 2008<BR></DIV>To: "Alon Mozes" &lt;<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>&gt;, <A href="mailto:vtkusers@vtk.org" target=_blank rel=nofollow>vtkusers@vtk.org</A><BR>Date: Thursday, January 29, 2009, 8:14 AM 
<DIV>
<DIV></DIV>
<DIV><BR><BR>
<DIV>
<DIV>I am doing the same thing and got a bunch of errors. I wonder why you have to turn off VTK_USE_VIDEO_FOR_WINDOWS? Thank you.</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR><B><I>Alon Mozes &lt;<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>&gt;</I></B> wrote:</DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<DIV>Hi All,</DIV>
<DIV>I have a great project using VTK/ITK in an older version of Visual Studio.&nbsp; I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition).&nbsp; I've found that I must recompile VTK/ITK to properly do so.&nbsp; I've started from scratch and installed the latest CMake 2.6&nbsp;which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1.&nbsp; For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING.&nbsp; Then I compile the ALL_BUILD in Visual Studio and I get several errors.&nbsp; I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away.&nbsp; I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think&nbsp;is critical for me):</DIV>
<DIV>&nbsp;</DIV><FONT size=1>
<DIV>C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\sdkddkver.h(217) : fatal error C1189: #error : _WIN32_WINNT settings conflicts with _WIN32_IE setting</DIV></FONT>
<DIV>&nbsp;</DIV>
<DIV>When I dig a little, I'm taken to the following lines of code:</DIV>
<DIV>&nbsp;</DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#if</DIV></FONT></FONT><FONT size=2>((_WIN32_WINNT &lt; _WIN32_WINNT_WIN2K) &amp;&amp; (_WIN32_IE &gt; _WIN32_IE_IE60SP1))</FONT></TD></TR></TBODY></TABLE></BLOCKQUOTE></DIV><FONT color=#808080 size=2><FONT color=#808080 size=2>
<DIV>#error _WIN32_WINNT settings conflicts with _WIN32_IE setting</DIV></FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#endif</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#000000>Its clearly passing this conditional and triggering this error.&nbsp; The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 &lt; 0x0500) so the whole thing should not pass.&nbsp; What's going on here?&nbsp; Any help would be greatly appreciated.</FONT></DIV>
<DIV><FONT color=#000000></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000>Thanks for the help.</FONT></DIV></FONT></FONT></DIV></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE>
<DIV>
<DIV></DIV>
<DIV><BR>_______________________________________________<BR>This is the private VTK discussion list.<BR>Please keep messages on-topic. Check the FAQ at: <A href="http://www.vtk.org/Wiki/VTK_FAQ" target=_blank rel=nofollow>http://www.vtk.org/Wiki/VTK_FAQ</A><BR>Follow this link to subscribe/unsubscribe:<BR><A href="http://www.vtk.org/mailman/listinfo/vtkusers" target=_blank rel=nofollow>http://www.vtk.org/mailman/listinfo/vtkusers</A><BR><BR>
<DIV></DIV><BR></DIV></DIV><BR>_______________________________________________<BR>This is the private VTK discussion list.<BR>Please keep messages on-topic. Check the FAQ at: <A href="http://www.vtk.org/Wiki/VTK_FAQ" target=_blank rel=nofollow>http://www.vtk.org/Wiki/VTK_FAQ</A><BR>Follow this link to subscribe/unsubscribe:<BR><A href="http://www.vtk.org/mailman/listinfo/vtkusers" target=_blank rel=nofollow>http://www.vtk.org/mailman/listinfo/vtkusers</A><BR><BR></BLOCKQUOTE></DIV><BR></DIV></DIV></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE><BR></BLOCKQUOTE></DIV><BR></DIV></DIV></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE><BR></BLOCKQUOTE></DIV><BR></DIV></DIV></DIV></BLOCKQUOTE></TD></TR></TBODY></TABLE><BR></DIV><PRE>_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
</PRE></BLOCKQUOTE></td></tr></table><br>