<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><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. 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. I'm very accustomed to dealing with the VS project settings format and am a total newbie to the CMake lists. If you insist that CMake is required to getting the project to work, I will invest the effort. Otherwise, I would prefer to simply tweak what was an already perfectly functioning project.</DIV>
<DIV> </DIV>
<DIV>Thanks for the advice.<BR><BR>--- On <B>Wed, 2/4/09, David Cole <I><david.cole@kitware.com></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: David Cole <david.cole@kitware.com><BR>Subject: Re: [vtkusers] Compile with Visual Studio 2008<BR>To: "Alon Mozes" <amozes77@yahoo.com><BR>Cc: vtkusers@vtk.org, "Jim" <jiksed@yahoo.com><BR>Date: Wednesday, February 4, 2009, 3:45 AM<BR><BR>
<DIV id=yiv230119323>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><<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>></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> </DIV>
<DIV>I'm able to compile VTK now without complaints about MFC. However, now I try to compile my application and I get an error:</DIV>
<DIV> </DIV><FONT size=1>
<DIV>1>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>
<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). I am using VTK 5.2.1. I checked the previous version I was using - VTK 5.0.3 - and the vtkMFCWindow.h file doesn't include vtkMFCConfigure.h. Instead, it includes vtkConfigure.h, so this seems to be a new change. Any idea what I'm doing wrong? I notice there's an MFC project setting for compiling using Standard Windows, MFC in a shared dll, and MFC in a static library. This setting is available for both the VTK ALL_BUILD project as well as my own. I've tried using standard windows and static library with both with no luck. Maybe this setting matters somehow?</DIV>
<DIV> </DIV>
<DIV>Any help would be greatly appreciated. Thanks.</DIV>
<DIV class=Ih2E3d>
<DIV><BR><BR>--- On <B>Mon, 2/2/09, David Cole <I><<A href="mailto:david.cole@kitware.com" target=_blank rel=nofollow>david.cole@kitware.com</A>></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 <<A href="mailto:david.cole@kitware.com" target=_blank rel=nofollow>david.cole@kitware.com</A>>
<DIV class=Ih2E3d><BR>Subject: Re: [vtkusers] Compile with Visual Studio 2008<BR>To: "Alon Mozes" <<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>><BR></DIV>
<DIV class=Ih2E3d>Cc: <A href="mailto:vtkusers@vtk.org" target=_blank rel=nofollow>vtkusers@vtk.org</A>, "Jim" <<A href="mailto:jiksed@yahoo.com" target=_blank rel=nofollow>jiksed@yahoo.com</A>><BR>Date: Monday, February 2, 2009, 4:28 AM<BR><BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=Wj3C7c>
<DIV>Did you not see my response to this thread the other day....?<BR><BR><BR> The first three lines of vtkMFCWindow.cpp are the culprit. They read:
<DIV><BR></DIV>
<DIV> #ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.</DIV>
<DIV> #define WINVER 0x0400</DIV>
<DIV> #endif</DIV>
<DIV><BR></DIV>
<DIV> Remove them or comment them out and it should work ok with VS2008.</DIV>
<DIV><BR></DIV>
<DIV> 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><<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>></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. 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). I got rid of that and still have one problem with the MFC lib which I know I need. Anyone out there compile VTK with Visual Studio 2008 while keeping the MFC flag? Is this a problem with my Windows settings somehow? My Visual Studio settings? Or VTK?</DIV>
<DIV> </DIV>
<DIV>Thanks,</DIV>
<DIV>Alon<BR><BR>--- On <B>Thu, 1/29/09, Jim <I><<A href="mailto:jiksed@yahoo.com" target=_blank rel=nofollow>jiksed@yahoo.com</A>></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">From: Jim <<A href="mailto:jiksed@yahoo.com" target=_blank rel=nofollow>jiksed@yahoo.com</A>>
<DIV><BR>Subject: Re: [vtkusers] Compile with Visual Studio 2008<BR></DIV>To: "Alon Mozes" <<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>>, <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> </DIV>
<DIV><BR><B><I>Alon Mozes <<A href="mailto:amozes77@yahoo.com" target=_blank rel=nofollow>amozes77@yahoo.com</A>></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. I need to upgrade to the latest version of VS (Visual Studio 2008 Professional Edition). I've found that I must recompile VTK/ITK to properly do so. I've started from scratch and installed the latest CMake 2.6 which offers an option to use the Visual Studio 2008 compiler and VTK 5.2.1. For the configuration, I turn on VTK_USE_MFC (via VTK_USE_GUISUPPORT) and VTK_RENDERING. Then I compile the ALL_BUILD in Visual Studio and I get several errors. I reconfigured CMake to turn off the VTK_USE_VIDEO_FOR_WINDOWS and all but one error goes away. I'm still stuck with the following failure (which seems to be in the vtkMFC package which I think is critical for me):</DIV>
<DIV> </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> </DIV>
<DIV>When I dig a little, I'm taken to the following lines of code:</DIV>
<DIV> </DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>#if</DIV></FONT></FONT><FONT size=2>((_WIN32_WINNT < _WIN32_WINNT_WIN2K) && (_WIN32_IE > _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> </DIV>
<DIV><FONT color=#000000>Its clearly passing this conditional and triggering this error. The weird thing is that the first part of the conditional should be 0 (the values seem to be 0x0600 < 0x0500) so the whole thing should not pass. What's going on here? Any help would be greatly appreciated.</FONT></DIV>
<DIV><FONT color=#000000></FONT> </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></BLOCKQUOTE></td></tr></table><br>