Bob,<br><br>You really should use cmake to configure your project. It might be possible to do it without cmake but I don't know how to do it. If you use cmake, you should not set any includes or paths in Visual Studio. CMake does that when it creates the solution file.<br>
<br>There are 100's of examples here with corresponding CMakeLists.txt files.<br><br><a href="http://vtk.org/Wiki/VTK/Examples">http://vtk.org/Wiki/VTK/Examples</a><br><br>Bill<br><br><br><div class="gmail_quote">On Fri, Apr 8, 2011 at 11:49 AM, Bob Palank <span dir="ltr"><<a href="mailto:bob@stlcc.org">bob@stlcc.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Here is my code:</span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: green;">// Cone2011Test.cpp : main project file.</span><span style="font-size: 9.5pt; font-family: Consolas;"></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;"> </span></p><p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">#include</span><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: rgb(163, 21, 21);">"stdafx.h"</span></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: green;">// Using VC++ Project Properties | Configuration Properties | VC++ Directories </span><span style="font-size: 9.5pt; font-family: Consolas;"></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: green;">// D:\Vtk561-bin and d:\vtk561 $(IncludePath) were placed in the include path</span><span style="font-size: 9.5pt; font-family: Consolas;"></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">#include</span><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: rgb(163, 21, 21);">"vtkCylinderSource.h"</span></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">#include</span><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: rgb(163, 21, 21);">"vtkPolyDataMapper.h"</span></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">#include</span><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: rgb(163, 21, 21);">"vtkActor.h"</span></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">#include</span><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: rgb(163, 21, 21);">"vtkRenderer.h"</span></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">#include</span><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: rgb(163, 21, 21);">"vtkRenderWindow.h"</span></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">#include</span><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: rgb(163, 21, 21);">"vtkRenderWindowInteractor.h"</span></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">#include</span><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: rgb(163, 21, 21);">"vtkProperty.h"</span></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">#include</span><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: rgb(163, 21, 21);">"vtkCamera.h"</span></span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;"> </span></p><p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;"> </span></p><p class="MsoNormal" style="">
<span style="font-size: 9.5pt; font-family: Consolas; color: blue;">using</span><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: blue;">namespace</span> System;</span></p><p class="MsoNormal" style="">
<span style="font-size: 9.5pt; font-family: Consolas;"> </span></p><p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas; color: blue;">int</span><span style="font-size: 9.5pt; font-family: Consolas;"> main(<span style="color: blue;">array</span><System::String ^> ^args)</span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;">{</span></p><p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;"> Console::WriteLine(L<span style="color: rgb(163, 21, 21);">"Hello World"</span>);</span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;"> Console::ReadLine();</span></p><p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;"> <span style="color: blue;">return</span> 0;</span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;">}</span></p><p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;">=============================================================================================</span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;">The Build Reports:<br></span><span style="font-size: 9pt; font-family: Consolas;">------ Build started: Project: Cone2011Test, Configuration: Debug Win32 ------</span></p>
<p class="MsoNormal" style=""><span style="font-size: 9pt; font-family: Consolas;"> Cone2011Test.cpp</span></p><p class="MsoNormal" style=""><span style="font-size: 9pt; font-family: Consolas;">Cone2011Test.cpp(6): fatal error C1083: Cannot open include file: 'vtkCylinderSource.h': No such file or directory</span></p>
<p class="MsoNormal" style=""><span style="font-size: 9pt; font-family: Consolas;">========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========</span></p><p class="MsoNormal" style=""><span style="font-size: 9pt; font-family: Consolas;">=============================================================================================<br>
If I comment out the 8 vtk #includes I can Build and Run <br><br>BR</span></p><p class="MsoNormal" style=""><span style="font-size: 9pt; font-family: Consolas;"> Bob</span></p><p class="MsoNormal" style=""><span style="font-size: 9pt; font-family: Consolas;"> </span></p>
<p class="MsoNormal" style=""><span style="font-size: 9.5pt; font-family: Consolas;"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0in 0in;"><p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> Bill Lorensen [mailto:<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>] <br>
<b>Sent:</b> Thursday, April 07, 2011 10:43 PM<br><b>To:</b> Bob Palank<br><b>Cc:</b> VTK Users<div><div></div><div class="h5"><br><b>Subject:</b> Re: [vtkusers] VC++ 2010 Express Build Issues</div></div></span></p></div>
<div><div></div><div class="h5"><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-bottom: 12pt;">Bob,<br><br>When you say you "add code for vtk includes", what do you mean? Where do you add the code?<br>
<br>Bill</p><div><p class="MsoNormal">On Thu, Apr 7, 2011 at 9:09 PM, Bob Palank <<a href="mailto:bob@stlcc.org" target="_blank">bob@stlcc.org</a>> wrote:</p><div><div><p class="MsoNormal">I start a new Console application called Cone2011Test and the VC supplied code r<span style="color: rgb(31, 73, 125);">a</span>n as expected.</p>
<div><p class="MsoNormal" style="margin-bottom: 12pt;"><br>I add code for vtk includes and set the Include directory to vtk561-bin and build again.</p></div><p class="MsoNormal">Given I did the above, I’m not sure if Cone2011Test is being configured with CMake ?<br>
How do I check?<br>I have attached the requested file.<br>In older versions of vtk I saw something like the image below – note 1 project</p><p class="MsoNormal"><img src="cid:image001.png@01CBF5DA.96428A90" height="290" width="226" border="0"></p>
<p class="MsoNormal">===============================================<br>Now when I try Win32Cone.sln from the examples, I encounter a somewhat long delay and <br>Solution Explorer shows 31 projects. A partial screenshot follows<br>
<img src="cid:image002.png@01CBF5DA.96428A90" height="414" width="260" border="0"></p><p class="MsoNormal">I don’t think the above is what I should see in the Solution Explorer window.<br>Am I right ?<br><br>Bob</p><p class="MsoNormal">
<span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><div style="border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0in 0in; border-color: -moz-use-text-color;">
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> Bill Lorensen [mailto:<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>] <br><b>Sent:</b> Wednesday, April 06, 2011 10:39 PM<br>
<b>To:</b> Bob Palank<br><b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br><b>Subject:</b> Re: [vtkusers] VC++ 2010 Express Build Issues</span></p></div><div><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-bottom: 12pt;">
Bob,<br><br>I assume Cone2011Test is being configured with CMake. Can you post your CMakeLists.txt file?<br><br><br>Bill</p></div><div><div><p class="MsoNormal">On Wed, Apr 6, 2011 at 5:01 PM, Bob Palank <<a href="mailto:bob@stlcc.org" target="_blank">bob@stlcc.org</a>> wrote:</p>
</div><div><div><div><p class="MsoNormal">I’m running XP Pro SP3 and using VC++ 2010 Express.</p><p class="MsoNormal">I think I have a clean install of vtk 5.6.1 in vtk561-bin.</p><p class="MsoNormal">How would I check to be sure the install is correct ?</p>
</div><p class="MsoNormal">I start a new Console application called Cone2011Test and the VC supplied code r<span style="color: rgb(31, 73, 125);">a</span>n as expected.</p><div><p class="MsoNormal"><br>I add code for vtk includes and set the Include directory to vtk561-bin and build again.</p>
</div><div><p class="MsoNormal" style="margin-bottom: 12pt;">VC looks for and cannot find vtkCylinderSource.h.<br><br>Please assist. <br>Perhaps there are suggested methods for building vtk application that I don’t know.<br>
I have looked at the examples and would prefer to code my examples from scratch.<br><span style="color: rgb(136, 136, 136);"><br>Bob</span></p></div></div></div><div><p class="MsoNormal" style="margin-bottom: 12pt;"><br>_______________________________________________<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></p>
</div></div><p class="MsoNormal"> </p></div></div></div><p class="MsoNormal"> </p></div></div></div></div></blockquote></div><br>