<span style>Thanks for reponding.</span><div style><br></div><div style>Yes, I think there is ${VTK_LIBRARIES} in the CMakeLists.txt Here is the part withs VTK in the CMakeLists.txt file :</div><div style><font color="#222222" face="arial, sans-serif"><br>

</font></div><div style><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<font color="#222222" face="arial, sans-serif"><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

OPTION(WITH_VTK &quot;Set to OFF to build without VTK&quot; ON )</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

IF (WITH_VTK)</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

  FIND_PACKAGE(VTK REQUIRED)</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

  IF (VTK_FOUND)</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

    INCLUDE (${VTK_USE_FILE})</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<span style="white-space:pre-wrap">        </span>SET(VTK_LIBRARIES vtkRendering vtkCommon)</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

  ENDIF (VTK_FOUND)</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

ENDIF (WITH_VTK)</blockquote></font></blockquote><div><br></div><div>and</div><div><br></div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">IF (WITH_PETSC)</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="white-space:pre-wrap">        </span>SET(LIBS</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="white-space:pre-wrap">        </span>   <span style="white-space:pre-wrap">        </span>${VTK_LIBRARIES}  </blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="white-space:pre-wrap">        </span>   <span style="white-space:pre-wrap">        </span>scopi blas lapack cblas slu voro++</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="white-space:pre-wrap">        </span>   <span style="white-space:pre-wrap">        </span>${PETSC_LIBRARIES} ${FFTW_LIBRARIES} StokesPartLib</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="white-space:pre-wrap">        </span>)</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">ELSE ()</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="white-space:pre-wrap">        </span>SET(LIBS</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="white-space:pre-wrap">        </span>   <span style="white-space:pre-wrap">        </span>${VTK_LIBRARIES}  </blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="white-space:pre-wrap">        </span>   <span style="white-space:pre-wrap">        </span>scopi blas lapack cblas slu voro++</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="white-space:pre-wrap">        </span>)</blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">ENDIF (WITH_PETSC)</blockquote>

</blockquote><div> </div></div><br><div class="gmail_quote">On Tue, Mar 6, 2012 at 9:56 PM, John Drescher <span dir="ltr">&lt;<a href="mailto:drescherjm@gmail.com">drescherjm@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">On Tue, Mar 6, 2012 at 3:52 PM, Yichuan GU &lt;<a href="mailto:guyichuan@gmail.com">guyichuan@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; I&#39;m new to vtk. Actually i try to compile a particle modeling software<br>
&gt; written by our professor with vtk components and i met several undefined<br>
&gt; reference errors:<br>
&gt;<br>
&gt;&gt;&gt; Linking CXX executable bin/gmc.out<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; lib/libscopi.a(Out_VTK.o): In function `Out_VTK::plot(int)&#39;:<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Out_VTK.cpp:(.text+0x98c): undefined reference to<br>
&gt;&gt;&gt; `vtkPolyDataMapper::New()&#39;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Out_VTK.cpp:(.text+0x9c6): undefined reference to `vtkLODActor::New()&#39;<br>
&gt;&gt;&gt;<br>
&gt; How can i fix this problem ? Thanks a lot !!<br>
&gt;<br>
<br>
</div></div>Make sure you have ${VTK_LIBRARIES} in your target_link_libraries for<br>
your target in your CMakeLists.txt file for your project.<br>
<span class="HOEnZb"><font color="#888888"><br>
John<br>
</font></span></blockquote></div><br>