On Thu, Nov 15, 2012 at 3:51 AM, alex88 <span dir="ltr">&lt;<a href="mailto:alex88@correo.ugr.es" target="_blank">alex88@correo.ugr.es</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
Im starting to use VTK in a project. Im working in Windows, using Code::Blocks with Mingw.<br>
I built VTK and installed it with no problems.<br>
<br>
In my project, I added the include folder to the search directories, and linked against all the static libraries generated with the instalation (the ones in VTK/lib, wich I added as a library directory), but when I compile, it finds all the includes, but throws VTK related linking errors.<br>


<br>
Why could be the problem?<br>
<br>
Thanx you :)<br>
<br>
Alex<br></blockquote><div><br></div>It is strongly, strongly suggested that you use CMake to generate your project. It will handle all of the include paths, linker paths, and linked libraries for you automatically. Just use something like this, where here we are building a project called &quot;Sphere&quot; and the only source file is Sphere.cxx.<br clear="all">
<br><pre class="de1" style="padding:0px;border:0px none white;background-color:rgb(255,255,255);line-height:1.2em;font-size:10px;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><span class="kw1" style="color:rgb(31,63,129)">cmake_minimum_required</span><span class="sy0" style="color:rgb(25,125,139)">(</span><span class="kw3" style="color:rgb(7,120,7)">VERSION</span> 2.8<span class="sy0" style="color:rgb(25,125,139)">)</span>
 
<span class="kw1" style="color:rgb(31,63,129)">PROJECT</span><span class="sy0" style="color:rgb(25,125,139)">(</span>Sphere<span class="sy0" style="color:rgb(25,125,139)">)</span>
 
<span class="kw1" style="color:rgb(31,63,129)">find_package</span><span class="sy0" style="color:rgb(25,125,139)">(</span>VTK REQUIRED<span class="sy0" style="color:rgb(25,125,139)">)</span>
<span class="kw1" style="color:rgb(31,63,129)">include</span><span class="sy0" style="color:rgb(25,125,139)">(</span><span class="re0" style="color:rgb(176,128,0)">${VTK_USE_FILE}</span><span class="sy0" style="color:rgb(25,125,139)">)</span>
 
<span class="kw1" style="color:rgb(31,63,129)">add_executable</span><span class="sy0" style="color:rgb(25,125,139)">(</span>Sphere Sphere.cxx<span class="sy0" style="color:rgb(25,125,139)">)</span>
<span class="kw1" style="color:rgb(31,63,129)">target_link_libraries</span><span class="sy0" style="color:rgb(25,125,139)">(</span>Sphere <span class="re0" style="color:rgb(176,128,0)">${VTK_LIBRARIES}</span><span class="sy0" style="color:rgb(25,125,139)">)</span>
</pre><pre class="de1" style="padding:0px;border:0px none white;background-color:rgb(255,255,255);line-height:1.2em;font-size:10px;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><span class="sy0" style="color:rgb(25,125,139)"><br>
</span></pre>David</div>