Perhaps other can help regarding building VTK apps without cmake. CMake is popular for many open source apps. I&#39;m sure you can build your app without cmake, but I&#39;m not the one to help you.<div><br></div><div>Bill<br>
<br><div class="gmail_quote">On Tue, Aug 14, 2012 at 4:51 PM, Trevor Irons <span dir="ltr">&lt;<a href="mailto:trevorirons@gmail.com" target="_blank">trevorirons@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">
That sounded wrong. I&#39;m fully aware that CMake is a great way to write portable applications. What I mean I guess is a simpler way to write simple applications that use VTK &gt; 5.8, avoiding the need to use $VTK_LIBRARIES. Or is there a way to make CMake set $VTK_LIBRARIES as an environmental variable so other build processes can use it?<br>

<br>Thanks,<br><br clear="all">-- Trevor<div class="HOEnZb"><div class="h5"><br><br>
<br><br><div class="gmail_quote">On 14 August 2012 20:37, Trevor Irons <span dir="ltr">&lt;<a href="mailto:trevorirons@gmail.com" target="_blank">trevorirons@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">

OK, I was able to build all of the examples OK. <br><br>My problem is that I do not use CMake in my application, so relying on CMake is not a very good solution for me. Are there any resources for how to write portable applications using VTK 6.0, I have been relying on users to have VTK installed already. Maybe I should stick with 5.10 for a while. <br>



<br>Thanks again,<br><br clear="all">-- Trevor<div><div><br><br>
<br><br><div class="gmail_quote">On 14 August 2012 20:06, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@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">



The wiki examples should build with default settings for cmake.<div><div><br><br><br><br><div class="gmail_quote">On Tue, Aug 14, 2012 at 3:42 PM, Trevor Irons <span dir="ltr">&lt;<a href="mailto:trevorirons@gmail.com" target="_blank">trevorirons@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">Correction, I was following these directions. <br><br><a href="http://vtk.org/Wiki/VTK/Examples/Instructions/ForUsers" target="_blank">http://vtk.org/Wiki/VTK/Examples/Instructions/ForUsers</a><span><font color="#888888"><br>




<br clear="all">-- Trevor</font></span><div><div><br><br>
<br><br><div class="gmail_quote">On 14 August 2012 19:41, Trevor Irons <span dir="ltr">&lt;<a href="mailto:trevorirons@gmail.com" target="_blank">trevorirons@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">





Thanks for the help. I think it&#39;s come down to not having VTK_USE_RENDERING defined. <br>At least I get this error when following the directions on <a href="http://vtk.org/Wiki/VTK/Examples/Cxx" target="_blank">http://vtk.org/Wiki/VTK/Examples/Cxx</a>.<br>






<br>However, this does not seem to be an option when configuring VTK. There is VTK_Group_Rendering, but no VTK_USE_RENDERING option. <br>
<br>I also find this strange, as in my installation directory <br> $ ls -l  libvtkRendering*.so<br><br><a href="http://libvtkRenderingAnnotation-6.0.so" target="_blank">libvtkRenderingAnnotation-6.0.so</a>               <a href="http://libvtkRenderingGL2PS-6.0.so" target="_blank">libvtkRenderingGL2PS-6.0.so</a>                  <a href="http://libvtkRenderingMathText-6.0.so" target="_blank">libvtkRenderingMathText-6.0.so</a><br>






<a href="http://libvtkRenderingAnnotationPython27D-6.0.so" target="_blank">libvtkRenderingAnnotationPython27D-6.0.so</a>      <a href="http://libvtkRenderingGL2PSPython27D-6.0.so" target="_blank">libvtkRenderingGL2PSPython27D-6.0.so</a>         <a href="http://libvtkRenderingMathTextPython27D-6.0.so" target="_blank">libvtkRenderingMathTextPython27D-6.0.so</a><br>






<a href="http://libvtkRenderingContext2D-6.0.so" target="_blank">libvtkRenderingContext2D-6.0.so</a>                <a href="http://libvtkRenderingHybridOpenGL-6.0.so" target="_blank">libvtkRenderingHybridOpenGL-6.0.so</a>           <a href="http://libvtkRenderingOpenGL-6.0.so" target="_blank">libvtkRenderingOpenGL-6.0.so</a><br>






<a href="http://libvtkRenderingContext2DPython27D-6.0.so" target="_blank">libvtkRenderingContext2DPython27D-6.0.so</a>       <a href="http://libvtkRenderingHybridOpenGLPython27D-6.0.so" target="_blank">libvtkRenderingHybridOpenGLPython27D-6.0.so</a>  <a href="http://libvtkRenderingOpenGLPython27D-6.0.so" target="_blank">libvtkRenderingOpenGLPython27D-6.0.so</a><br>






<a href="http://libvtkRenderingCore-6.0.so" target="_blank">libvtkRenderingCore-6.0.so</a>                     <a href="http://libvtkRenderingImage-6.0.so" target="_blank">libvtkRenderingImage-6.0.so</a>                  <a href="http://libvtkRenderingVolume-6.0.so" target="_blank">libvtkRenderingVolume-6.0.so</a><br>






<a href="http://libvtkRenderingCorePython27D-6.0.so" target="_blank">libvtkRenderingCorePython27D-6.0.so</a>            <a href="http://libvtkRenderingImagePython27D-6.0.so" target="_blank">libvtkRenderingImagePython27D-6.0.so</a>         <a href="http://libvtkRenderingVolumeOpenGL-6.0.so" target="_blank">libvtkRenderingVolumeOpenGL-6.0.so</a>                  <br>






<a href="http://libvtkRenderingFreeType-6.0.so" target="_blank">libvtkRenderingFreeType-6.0.so</a>                 <a href="http://libvtkRenderingLOD-6.0.so" target="_blank">libvtkRenderingLOD-6.0.so</a>                    <a href="http://libvtkRenderingVolumeOpenGLPython27D-6.0.so" target="_blank">libvtkRenderingVolumeOpenGLPython27D-6.0.so</a>         <br>






<a href="http://libvtkRenderingFreeTypeOpenGL-6.0.so" target="_blank">libvtkRenderingFreeTypeOpenGL-6.0.so</a>           <a href="http://libvtkRenderingLODPython27D-6.0.so" target="_blank">libvtkRenderingLODPython27D-6.0.so</a>           <a href="http://libvtkRenderingVolumePython27D-6.0.so" target="_blank">libvtkRenderingVolumePython27D-6.0.so</a>               <br>






<a href="http://libvtkRenderingFreeTypeOpenGLPython27D-6.0.so" target="_blank">libvtkRenderingFreeTypeOpenGLPython27D-6.0.so</a>  <a href="http://libvtkRenderingLabel-6.0.so" target="_blank">libvtkRenderingLabel-6.0.so</a>                                                                      <br>






<a href="http://libvtkRenderingFreeTypePython27D-6.0.so" target="_blank">libvtkRenderingFreeTypePython27D-6.0.so</a>        <a href="http://libvtkRenderingLabelPython27D-6.0.so" target="_blank">libvtkRenderingLabelPython27D-6.0.so</a>    <br>





<br>Generates quite a lot of hits. Thanks again for the tips and suggestions.<span><font color="#888888"><br>
<br clear="all">-- Trevor</font></span><div><div><br><br>
<br><br><div class="gmail_quote">On 14 August 2012 17:54, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@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">







The built examples will be in the bin directory of your VTK.<br><br>A more extensive set of examples are on the Wiki:<br><a href="http://vtk.org/Wiki/VTK/Examples/Cxx" target="_blank">http://vtk.org/Wiki/VTK/Examples/Cxx</a><br>







<br>each has a valid CMakeLists.txt file.<br>
<br>You can also build them all by following these instructions: <a href="http://vtk.org/Wiki/VTK/Examples/Instructions/ForUsers" target="_blank">http://vtk.org/Wiki/VTK/Examples/Instructions/ForUsers</a><span><font color="#888888"><br>







<br>Bill</font></span><div><div><br><br><div class="gmail_quote">
On Tue, Aug 14, 2012 at 1:48 PM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@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">








PLease keep repiles on the list.<br><br>For VTK6 use:<br><br>${VTK_LIBRARIES} instead of vtkRendering<div><div><br><br><div class="gmail_quote">On Tue, Aug 14, 2012 at 1:02 PM, Trevor Irons <span dir="ltr">&lt;<a href="mailto:trevorirons@gmail.com" target="_blank">trevorirons@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">Hi Bill! Wow. <br><br>I guess this is the underlying question. I enabled build examples in CMake. But I honestly can&#39;t find where these are compiled to. My example is from <br>









<br>VTKSOURCE/Examples/Tutorial/Step1/Cxx/Cone.cxx<br>
<br>And the CMakeLists there specifies <br><br>PROJECT (Step1)<br><br>IF(NOT VTK_BINARY_DIR)<br>FIND_PACKAGE(VTK REQUIRED)<br>IF(NOT VTK_USE_RENDERING)<br>  MESSAGE(FATAL_ERROR &quot;Example ${PROJECT_NAME} requires VTK_USE_RENDERING.&quot;)<br>










ENDIF(NOT VTK_USE_RENDERING)<br>INCLUDE(${VTK_USE_FILE})<br>ENDIF(NOT VTK_BINARY_DIR)<br><br>ADD_EXECUTABLE(Cone Cone.cxx)<br>TARGET_LINK_LIBRARIES(Cone vtkRendering)<br><br>But vtkRendering I think is a pre 6.0 library? Where in the build directory are the Examples built? Is there an updated CmakeLists file there?<br>










<br>Thanks so much,<br><br clear="all">-- Trevor<div><div><br><br>
<br><br><div class="gmail_quote">On 14 August 2012 16:51, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@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">











Have you tried building your example with CMake. I suspect you are missing some libraries.<br><br><div class="gmail_quote"><div><div>On Tue, Aug 14, 2012 at 11:47 AM, Trevor Irons <span dir="ltr">&lt;<a href="mailto:trevorirons@gmail.com" target="_blank">trevorirons@gmail.com</a>&gt;</span> wrote:<br>












</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Sorry if this has been asked before, but I couldn&#39;t find it. <br><br>I am having trouble porting an application over to VTK 6.0. I followed the guide at <br>












<a href="http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide" target="_blank">http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide</a><br clear="all">

<br>I am able to get my project to compile but I hit a seg fault at execution. As a minimal example consider a pared down Cone.cxx from the Examples <br><br>// First include the required header files for the VTK classes we are using.<br>













#include &quot;vtkConeSource.h&quot;<br>#include &quot;vtkPolyDataMapper.h&quot;<br><br>int main()<br>{<br><br>  vtkConeSource *cone = vtkConeSource::New();<br>  cone-&gt;SetHeight( 3.0 );<br>  cone-&gt;SetRadius( 1.0 );<br>













  cone-&gt;SetResolution( 10 );<br><br>  vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();<br>  coneMapper-&gt;SetInputConnection( cone-&gt;GetOutputPort() );<br>  //coneMapper-&gt;SetInputData( cone-&gt;GetOutput() );                         // I tried this too<br>













<br>  exit(0);<br><br>} <br><br>I have been compiling with <br><br>g++ Cone.cxx -g -g3  -o testit  -I/usr/local/include/vtk-6.0/   -lvtkRenderingCore-6.0  -lvtkFiltersSources-6.0 -lvtkCommonExecutionModel-6.0 <br><br>on <br>













<br>g++ --version<br>g++ (GCC) 4.7.1 20120721 (prerelease)<br>Copyright (C) 2012 Free Software Foundation, Inc.<br>This is free software; see the source for copying conditions.  There is NO<br>warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br>













<br>And when I execute, I just see a segmentation fault. I assume I am doing something wrong, but I can&#39;t figure out what. <br><br>I ran it through gdb, but it just said the fault was in SetInputConnection, or SetInputData, I tried both. This is with the tip of VTK from the git repository.<br>













<br>Thanks for any suggestions. <br><span><font color="#888888"><br>-- Trevor<br><br>
</font></span><br></div></div>_______________________________________________<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><span><font color="#888888"><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>
</font></span></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>
</div>