Sounds like you aren&#39;t linking to the vtk libraries. I usually just link to a lot of them<br><br>vtkRendering vtkGraphics vtkHybrid vtkImaging vtkIO&nbsp; vtkFiltering vtkCommon<br><br>just to be sure :)<br><br clear="all">
Thanks,<br><br>David<br>
<br><br><div class="gmail_quote">2009/3/30 吴磊磊 <span dir="ltr">&lt;<a href="mailto:wu-leilei@hotmail.com">wu-leilei@hotmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
Hello All:<br><br>My name is Leilei Wu, and I got some problems when compiling the codes related with VTK in visual studio 2005, both in release and debug mode. (I used visual studio 2003 before, there was no this kind problem)<br>
<br>In the code PART1 (see below), the compiling is ok, but in the code PART2&nbsp; there are problems of<br><br>error LNK2001: unresolved external symbol &quot;__declspec(dllimport) public: void __thiscall vtkPolyDataMapper::SetInput(class vtkPolyData *)&quot; (__imp_?SetInput@vtkPolyDataMapper@@QAEXPAVvtkPolyData@@@Z)<br>
error LNK2001: unresolved external symbol &quot;__declspec(dllimport) public: static class vtkPolyDataMapper * __cdecl vtkPolyDataMapper::New(void)&quot; <br>(__imp_?New@vtkPolyDataMapper@@SAPAV1@XZ)<br><br>================================<br>
code PART1:<br>&nbsp; vtkContourFilter&nbsp; *VesselVolume =&nbsp; vtkContourFilter::New();<br>&nbsp; VesselVolume-&gt;SetInput( connector-&gt;GetOutput() );<br>&nbsp; VesselVolume-&gt;SetValue(0,255);<br><br>&amp;n
 bsp; vtkSmoothPolyDataFilter *SmoothPolyDataFilter = vtkSmoothPolyDataFilter::New();<br>&nbsp; SmoothPolyDataFilter-&gt;SetInput( VesselVolume-&gt;GetOutput() );<br>&nbsp; SmoothPolyDataFilter-&gt;SetNumberOfIterations( 175 );<br>
<br>&nbsp; vtkPolyDataNormals *NormalsPolyData = vtkPolyDataNormals::New();<br>&nbsp; NormalsPolyData-&gt;SetInput( SmoothPolyDataFilter-&gt;GetOutput() );<br>&nbsp; NormalsPolyData-&gt;FlipNormalsOn();<br><br>code PART2:<br>&nbsp; vtkPolyDataMapper&nbsp; *PolyMapper = vtkPolyDataMapper::New();<br>
&nbsp; PolyMapper-&gt;SetInput( NormalsPolyData-&gt;GetOutput() );<br>&nbsp; int colormode = PolyMapper-&gt;GetColorMode();<br>=================================<br>with the vtk header files of <br><br>#include &quot;vtkImageWriter.h&quot;<br>
#include &quot;vtkImageData.h&quot;<br>#include &quot;vtkImageViewer.h&quot;<br>#include &quot;vtkRenderWindowInteractor.h&quot;<br>#include &quot;vtkDataSetMapper.h&quot;<br>#include &quot;vtkPolyDataMapper.h&quot;<br>#include &quot;vtkRenderWindow.h&quot;<br>
#include &quot;vtkCamera.h&quot;<br>#
 include &quot;vtkActor.h&quot;<br>#include &quot;vtkRenderer.h&quot;<br>#include &quot;vtkCommand.h&quot;<br>#include &quot;vtkInteractorStyleTrackballCamera.h&quot;<br>#include &quot;vtkProperty.h&quot;<br>#include &quot;vtkMarchingCubes.h&quot;<br>
#include &quot;vtkContourFilter.h&quot;<br>#include &quot;vtkOutlineFilter.h&quot;<br>#include &quot;vtkPolyDataNormals.h&quot;<br>#include &quot;vtkSmoothPolyDataFilter.h&quot;<br>#include &quot;vtkOutlineSource.h&quot;<br>
=================================<br><br>Can someone give me some solutions (sorry if there are solutions already on the vtk users board)?&nbsp; Thank you very much! Have a nice day!<br><br>Best wishes<br>Leilei<br><br><hr>使用新一代 Windows Live Messenger 轻松交流和共享! <a href="http://im.live.cn/messenger.aspx" target="_blank">立刻下载!</a></div>

<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>