This is my CMake file:<br><br><br>PROJECT(SurfaceToImage) # Project name
<br>CMAKE_MINIMUM_REQUIRED( VERSION 2.6) # This is the minimum version of CMake<br>#*******************************************************************************
<br>FIND_PACKAGE(VTK REQUIRED)
<br>IF (VTK_FOUND)
<br> INCLUDE(${VTK_USE_FILE})
<br>ELSE (VTK_FOUND)
<br> MESSAGE(ERROR "Cannot build without a VTK build tree or a VTK installation. Please set VTK_DIR.")
<br>ENDIF (VTK_FOUND)
<br>#*******************************************************************************
<br>SET( SurfaceToImage_SOURCE SurfaceToImage.cxx )
<br>ADD_LIBRARY(SurfaceToImageLib SHARED ${SurfaceToImage_SOURCE})
<br>SET_TARGET_PROPERTIES (SurfaceToImageLib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
<br>TARGET_LINK_LIBRARIES (SurfaceToImageLib vtkIO vtkFiltering vtkCommon vtkImaging)
<br>ADD_EXECUTABLE( SurfaceToImage ${SurfaceToImage_SOURCE})
<br>TARGET_LINK_LIBRARIES (SurfaceToImage vtkIO vtkCommon vtkFiltering vtkImaging)
<br>#*******************************************************************************<br><br><div class="gmail_quote">On Tue, Apr 20, 2010 at 10:48 AM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com">daviddoria+vtk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Tue, Apr 20, 2010 at 11:45 AM, David Welch<br>
<div class="im"><<a href="mailto:dmwelch@engineering.uiowa.edu">dmwelch@engineering.uiowa.edu</a>> wrote:<br>
</div><div class="im">> Okay, I'm in the home stretch here... I've changed the code slightly to<br>
> output a XMLImageData file and take an input surface. CMake runs fine on<br>
> it, but it dies in the make process with this error:<br>
><br>
> CMakeFiles/SurfaceToImage.dir/SurfaceToImage.cxx.o: In function<br>
> `vtkSmartPointer<vtkPolyDataToImageStencil>::New()':<br>
> /usr/local/include/vtk-5.7/vtkSmartPointer.h:113: undefined reference to<br>
> `vtkPolyDataToImageStencil::New()'<br>
><br>
> The smart pointer line is fundamentally no different than any other line of<br>
> code. ??? Here's my code:<br>
<br>
</div>Are you linking to vtkHybrid (that is where<br>
vtkPolyDataToImageStencil.cxx lives) ? What does your CMakeLists.txt<br>
file look like?<br>
<br>
Thanks,<br>
<font color="#888888"><br>
David<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>David Welch<br>Graduate Student<br>Dept. of Biomedical Engineering<br>University of Iowa<br>Lab: (319) 335-5279<br>