<div dir="ltr"><div><div><div><div><div>Hi All,<br><br></div><div>I am completely new to VTK and have not been able to successfully compile one simple program.<br><br><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">&quot;vtkConeSource.h&quot;</span>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">main</span><span style="color:rgb(0,0,0)">()</span></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,0)">{</span></pre><span style="color:rgb(192,192,192)"></span><span style="color:rgb(0,128,0)">        //Create</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">a</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">cone</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">source</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">object</span>
<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(128,0,128)">vtkConeSource</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(0,0,0)">cone</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkConeSource</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">New</span><span style="color:rgb(0,0,0)">();</span></pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">cone</span><span style="color:rgb(0,0,0)">-&gt;</span><span style="font-style:italic;color:rgb(0,0,0)">SetHeight</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">3.0</span><span style="color:rgb(0,0,0)">);</span></pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">cone</span><span style="color:rgb(0,0,0)">-&gt;</span><span style="font-style:italic;color:rgb(0,0,0)">SetRadius</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">1.0</span><span style="color:rgb(0,0,0)">);</span></pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">    </span><span style="color:rgb(0,0,0)">cone</span><span style="color:rgb(0,0,0)">-&gt;</span><span style="font-style:italic;color:rgb(0,0,0)">SetResolution</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">10</span><span style="color:rgb(0,0,0)">);</span></pre>

<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(192,192,192)">        </span><span style="color:rgb(128,128,0)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">;</span></pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(0,0,0)">}</span></pre><br><br></div><div>When I try to compile, there are 32 undefined references. For example,<br><br><span style="color:rgb(170,0,0)">c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkGraphics.a(vtkConeSource.cxx.obj):vtkConeSource.cxx:(.text+0x1c): undefined reference to `vtkInformationVector::GetInformationObject(int)&#39;</span><br>
<br><br>I have read other posts similar to this problem, but I can&#39;t figure out what is wrong with my .pro file for QtCreator.<br><br></div><div>from my .pro file:<br><br><span style="color:rgb(128,0,128)">INCLUDEPATH</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Source-VTK5.10.1/Common
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">INCLUDEPATH</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Source-VTK5.10.1/Graphics</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">INCLUDEPATH</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Source-VTK5.10.1/Filtering</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">INCLUDEPATH</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Source-VTK5.10.1/Rendering</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">INCLUDEPATH</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Source-VTK5.10.1/Hybrid</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">INCLUDEPATH</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Source-VTK5.10.1/Imaging</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">INCLUDEPATH</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/includes/vtk-5.10</pre>

<pre style="margin:0px;text-indent:0px"><br></pre>
<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkCommon.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtksys.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libQVTK.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkViews.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkWidgets.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkInfovis.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkRendering.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkGraphics.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkImaging.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkIO.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkFiltering.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkDICOMParser.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkpng.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtktiff.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkzlib.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkjpeg.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkalglib.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkexpat.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkverdict.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkmetaio.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkNetCDF.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtksqlite.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkexoIIc.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkftgl.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkfreetype.a</pre>

<pre style="margin:0px;text-indent:0px"><span style="color:rgb(128,0,128)">LIBS</span><span style="color:rgb(192,192,192)"> </span>+=<span style="color:rgb(192,192,192)"> </span>c:/VTK/Install-VTK5.10.1/lib/vtk_5.10/libvtkHybrid.a</pre>
<pre style="margin:0px;text-indent:0px"><br></pre><pre style="margin:0px;text-indent:0px"></pre>I have the source code in: <pre style="margin:0px;text-indent:0px">C:\VTK\Source-VTK5.10.1<br></pre></div><div>I have the build code from after mingw32-make in: <br>
<pre style="margin:0px;text-indent:0px">C:\VTK\Build-VTK5.10.1<br></pre></div><div>I have the installed code from after mingw32-make install in: <br><pre style="margin:0px;text-indent:0px">C:\VTK\Install-VTK5.10.1<br></pre>
</div><div><br></div>I am on Windows and using the following software versions:<br><br>VTK 5.10.1<br></div>QtCreator 2.8.0<br></div>Qt 4.8.5<br></div><div>minGW 4.7.2, 32 bit, <br></div><div><br></div>VTK and Qt were compiled from source with minGW.<br>
<br></div>Any help would be appreciated. Thanks,<br><br>Ken<br clear="all"><br></div>