hi oleg,<br><br>I believe the easiest way to use VTK is by creating your projects using CMake, like you did with the VTK source. Creating CMakeList.txt files for your own projects is quite easy, I hope the following example helps:
<br><br>PROJECT (your_Project_name)<br>&nbsp;<br>#############<br>#vtk section<br>#############<br>INCLUDE (${CMAKE_ROOT}/Modules/FindVTK.cmake)<br>IF (USE_VTK_FILE)<br>&nbsp; INCLUDE(${USE_VTK_FILE})<br>ENDIF (USE_VTK_FILE)<br><br>
#################################<br>#MFC section, if you are using MFC<br>#################################<br>ADD_DEFINITIONS(-D_AFXDLL)<br>SET(CMAKE_MFC_FLAG 2)<br><br><br>ADD_EXECUTABLE(your_Project_name WIN32<br>#your source files go here 
<br>#your_Project_name.cpp<br>#your_Project_name.h<br>#etc<br>#etc<br>)<br><br><br>TARGET_LINK_LIBRARIES(your_Project_name<br>&nbsp; vtkRendering<br>&nbsp; vtkGraphics<br>&nbsp; vtkIO<br>&nbsp; vtkFiltering<br>&nbsp; vtkCommon<br>&nbsp; vtkWidgets<br>
)<br><br>Save the above lines as CMakelist.txt in your directory and modify it according to your needs. You should modify the link libraries section if you want to use other features of VTK, but i think these libraries will cover your initial tests. Then run CMake as you did when you created the VTK project.
<br><br>hope this helps,<br>yianis<br><br><br><div><span class="gmail_quote">On 12/4/06, <b class="gmail_sendername">Oleg Pianykh</b> &lt;<a href="mailto:opiany@gmail.com">opiany@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>I&nbsp;downloaded VTK and run CMake 2.4&nbsp;to build the .sln file for my Visual Studio. </div>
<div>Then I was able to compile VTK with Visual Studio, worked fine. </div>
<div>&nbsp;</div>
<div>Now I'd like to test some sample VTL code, or write mine, BUT</div>
<div>1. Which VTK .h files should I include, with which static .lib VTK libraries? I do not see any single VTK include folder or file - do I do this by trial and error?</div>
<div>2. As soon as I add something like</div>
<div><font size="2">
<p>#include &quot;vtkConeSource.h&quot;</p>
<p>to my program, I immediately get an error message from the Visual Studio compiler about</p>
<p>#cmakedefine</p>
<p>being an illegal preprocessor directive. Did I do something wrong with CMake (I changes a few settings there, following instructions from one VTK posting about CMake that I found online)? If&nbsp;I replace #cmakedefine with #define in 
vtkConfig.h file, this error message disappears, but i get an avalanche of other errors.</p>
<p>What am I doing wrong, and what is the simplest way to run at least one VTK sample source code to get started?</p></font></div>

<br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br><br></blockquote></div><br>