<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16636"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Segoe UI">
<DIV>It took me a while to get back to this issue, but I was able to test my theory that the problem was related to not building VTK with shared libraries.</DIV>
<DIV> </DIV>
<DIV>Short story, my hypothesis was incorrect, rebuilding VTK with Shared Libraries turned on (and rebuilding ITK) did not solve the problem.  I think I was using VTK 6.0.0.  I just upgraded to the latest version and built VTK with static libraries, rebuilt ITK, and the problem went away.  So, I'm not sure if it was a problem with the version of VTK I was using, something set incorrectly in my VTK build, or something else.</DIV>
<DIV> </DIV>
<DIV>Thanks for the responses to this issue . . .</DIV>
<DIV> </DIV>
<DIV>Kent</DIV>
<DIV> </DIV>
<DIV><BR><BR>>>> Matt McCormick <matt.mccormick@kitware.com> 4/9/2015 5:31 PM >>><BR>Hi Kent,<BR><BR>Thanks for discussing this on the list. A restriction on static<BR>libraries is not a known issue -- it would be interesting to get your<BR>report on whether shared libraries help.<BR><BR>What version of ITK and VTK is this?<BR><BR>Thanks,<BR>Matt<BR><BR>On Thu, Apr 9, 2015 at 3:19 PM, Kent Ogden <ogdenk@upstate.edu> wrote:<BR>> I think I realized what the problem is.  I don't have time to verify this<BR>> now but I will report back when I do.<BR>><BR>> When I did this last (about a year ago) I was using a VTK build that was set<BR>> to create shared libraries.  As I recall that was required when I built ITK<BR>> with ITKVTKGlue turned on.  My current build is using static VTK libraries<BR>> (nice not to have to deal with .dll's) and I didn't get the error in CMake<BR>> when setting up ITK, and the Quickviewer worked just fine.  I suspect that<BR>> my problem now is that I don't have VTK built with shared libraries.  Does<BR>> this make sense to anyone?<BR>><BR>> Kent<BR>><BR>><BR>>>>> Pol Monsó Purtí 04/09/15 1:48 PM >>><BR>><BR>> Hello Kent,<BR>><BR>> vtkRenderingCore_INCLUDE is probably empty so it then results on #include<BR>> and that's it.<BR>><BR>> Maybe try adding #warning vtkRenderingCore_INCLUDE to see it's contents, but<BR>> that's probably what's happening.<BR>><BR>> 2015-04-09 18:42 GMT+02:00 Kent Ogden <ogdenk@upstate.edu>:<BR>>><BR>>> Hi,<BR>>><BR>>> I am trying to do something really simple, I have a VTK project (I'm<BR>>> trying this with the cone.cxx example, about as simple as it gets) and I<BR>>> want to add ITK functionality.  In the past I had used a modified version of<BR>>> the ITKQuickView example, and it used to work:<BR>>><BR>>> cmake_minimum_required(VERSION 2.8)<BR>>><BR>>> project(Cone)<BR>>><BR>>> find_package(ITK REQUIRED)<BR>>> include(${ITK_USE_FILE})<BR>>> if (ITKVtkGlue_LOADED)<BR>>>   find_package(VTK REQUIRED)<BR>>>   include(${VTK_USE_FILE})<BR>>> else()<BR>>>   find_package(ItkVtkGlue REQUIRED)<BR>>>   include(${ItkVtkGlue_USE_FILE})<BR>>>   set(Glue ItkVtkGlue)<BR>>> endif()<BR>>><BR>>> add_executable(Cone MACOSX_BUNDLE Cone.cxx)<BR>>> target_link_libraries(Cone<BR>>>   ${Glue}  ${VTK_LIBRARIES} ${ITK_LIBRARIES})<BR>>><BR>>> Now, however, I get the following compile error (VS 2012 64 bit on Win 7):<BR>>><BR>>> 2>C:\KW\VTKBuild\Rendering\Core\vtkRenderingCoreModule.h(37): error C2006:<BR>>> '#include' : expected a filename, found 'newline'<BR>>> The vicinity of that line in vtkRenderingCoreModule.h is<BR>>><BR>>> /* AutoInit implementations.  */<BR>>> #if defined(vtkRenderingCore_INCLUDE)<BR>>> # include vtkRenderingCore_INCLUDE  // Error is from this line<BR>>> #endif<BR>>> #if defined(vtkRenderingCore_AUTOINIT)<BR>>> # include "vtkAutoInit.h"<BR>>> VTK_AUTOINIT(vtkRenderingCore)<BR>>> #endif<BR>>><BR>>> I do not have any ITK functionality added to the program yet, it is just<BR>>> the cone.cxx example.  If I use a very simple CMakelists.txt file the<BR>>> program compiles and runs just fine:<BR>>><BR>>> cmake_minimum_required(VERSION 2.8)<BR>>><BR>>> project(Cone)<BR>>> set(VTK_DIR "C:/KW/VTKBuild")<BR>>> set(ITK_DIR "C:/KW/ITKBuild")<BR>>><BR>>> find_package(VTK REQUIRED)<BR>>> include(${VTK_USE_FILE})<BR>>><BR>>> add_executable(Cone MACOSX_BUNDLE Cone.cxx)<BR>>> target_link_libraries(Cone ${VTK_LIBRARIES} )<BR>>><BR>>> But if I try to add<BR>>><BR>>> find_package(ITK REQUIRED)<BR>>> include(${ITK_USE_FILE})<BR>>><BR>>> I get the same error as above.  I am sure this is a simple issue but my<BR>>> understanding of CMake is limited.  I know this isn't precisely an ITK<BR>>> problem per se but I hoped someone could point out what I am doing wrong.<BR>>><BR>>> Any help greatly appreciated!<BR>>><BR>>> Kent<BR>>><BR>>><BR>>><BR>>><BR>>><BR>>><BR>>><BR>>><BR>>><BR>>> Kent Ogden PhD<BR>>> Associate Professor, Radiology<BR>>> SUNY Upstate Medical University<BR>>> 750 E. Adams Street<BR>>> Syracuse, NY  13210<BR>>><BR>>> email:  ogdenk@upstate.edu<BR>>> voice:  (315) 464-5083<BR>>> fax:       (315) 464-8789<BR>>><BR>>> _____________________________________<BR>>> Powered by www.kitware.com<BR>>><BR>>> Visit other Kitware open-source projects at<BR>>> <A href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>>><BR>>> Kitware offers ITK Training Courses, for more information visit:<BR>>> <A href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</A><BR>>><BR>>> Please keep messages on-topic and check the ITK FAQ at:<BR>>> <A href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</A><BR>>><BR>>> Follow this link to subscribe/unsubscribe:<BR>>> <A href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</A><BR>>><BR>><BR>><BR>> _____________________________________<BR>> Powered by www.kitware.com<BR>><BR>> Visit other Kitware open-source projects at<BR>> <A href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</A><BR>><BR>> Kitware offers ITK Training Courses, for more information visit:<BR>> <A href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</A><BR>><BR>> Please keep messages on-topic and check the ITK FAQ at:<BR>> <A href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</A><BR>><BR>> Follow this link to subscribe/unsubscribe:<BR>> <A href="http://public.kitware.com/mailman/listinfo/insight-users">http://public.kitware.com/mailman/listinfo/insight-users</A><BR>><BR></DIV></BODY></HTML>