<div dir="ltr"><div>Greetings to the whole community of VTK,</div><div>I'm a newbie user!</div><div><br></div>After the installation of VTK on my PC (Ubuntu 14.04.2), I was trying to run the example linked here:<div><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone">http://www.vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Cone</a></div><div>During the installation I selected the "BUILD EXAMPLE" option.</div><div>I also unselected the "BUILD SHARED LIBS" option, because I can't proceed with the installation if I had selected it.</div><div><br></div><div>My steps were:</div><div>1) created the file Cone.cxx into the directory "$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CmakeFiles/Cone.dir" with the text:</div><div><div><br></div><div>#include <vtkConeSource.h></div><div>#include <vtkPolyData.h></div><div>#include <vtkSmartPointer.h></div><div>#include <vtkPolyDataMapper.h></div><div>#include <vtkActor.h></div><div>#include <vtkRenderWindow.h></div><div>#include <vtkRenderer.h></div><div>#include <vtkRenderWindowInteractor.h></div><div> </div><div>int main(int, char *[])</div><div>{</div><div>  //Create a cone</div><div>  vtkSmartPointer<vtkConeSource> coneSource = vtkSmartPointer<vtkConeSource>::New();</div><div>  coneSource->Update();</div><div> </div><div>  //Create a mapper and actor</div><div>  vtkSmartPointer<vtkPolyDataMapper> mapper = vtkSmartPointer<vtkPolyDataMapper>::New();</div><div>  mapper->SetInputConnection(coneSource->GetOutputPort());</div><div> </div><div>  vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New();</div><div>  actor->SetMapper(mapper);</div><div> </div><div>  //Create a renderer, render window, and interactor</div><div>  vtkSmartPointer<vtkRenderer> renderer = vtkSmartPointer<vtkRenderer>::New();</div><div>  vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();</div><div>  renderWindow->AddRenderer(renderer);</div><div>  vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor = vtkSmartPointer<vtkRenderWindowInteractor>::New();</div><div>  renderWindowInteractor->SetRenderWindow(renderWindow);</div><div> </div><div>  //Add the actors to the scene</div><div>  renderer->AddActor(actor);</div><div>  renderer->SetBackground(.3, .2, .1); // Background color dark red</div><div> </div><div>  //Render and interact</div><div>  renderWindow->Render();</div><div>  renderWindowInteractor->Start();</div><div> </div><div>  return EXIT_SUCCESS;</div><div>}</div></div><div><br clear="all"><div><div class="gmail_signature"><div>2) created the file CMakeLists.txt into the same directory above with the text:</div><div><div><br></div><div>cmake_minimum_required(VERSION 2.8)</div><div>project(Cone)</div><div><div>set(VTK_DIR $HOME/build-VTK)</div></div><div>find_package(VTK REQUIRED)</div><div>include(${VTK_USE_FILE})</div><div>add_executable(Cone Cone.cxx) </div><div>if(VTK_LIBRARIES)</div><div>  target_link_libraries(Cone ${VTK_LIBRARIES})</div><div>else()</div><div>  target_link_libraries(Cone vtkHybrid vtkWidgets)</div><div>endif()</div></div><div><br></div><div>3) typed the command "ccmake ." into the same directory above, pressed the C button and the G button</div><div><br></div><div>4) typed the command "make" into the same directory above, receiving the error explained below:</div><div><br></div><div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:19:27: error: vtkConeSource.h: No such file or directory</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:20:31: error: vtkPolyDataMapper.h: No such file or directory</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:21:29: error: vtkRenderWindow.h: No such file or directory</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:22:23: error: vtkCamera.h: No such file or directory</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:23:22: error: vtkActor.h: No such file or directory</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:24:25: error: vtkRenderer.h: No such file or directory</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx: In function ‘int main()’:</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: error: ‘vtkConeSource’ was not declared in this scope</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: error: ‘cone’ was not declared in this scope</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:34: error: ‘vtkConeSource’ is not a class or namespace</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: error: ‘vtkPolyDataMapper’ was not declared in this scope</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: error: ‘coneMapper’ was not declared in this scope</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:46: error: ‘vtkPolyDataMapper’ is not a class or namespace</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: error: ‘vtkActor’ was not declared in this scope</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: error: ‘coneActor’ was not declared in this scope</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:56: error: ‘vtkActor’ is not a class or namespace</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: error: ‘vtkRenderer’ was not declared in this scope</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: error: ‘ren1’ was not declared in this scope</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:65: error: ‘vtkRenderer’ is not a class or namespace</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: error: ‘vtkRenderWindow’ was not declared in this scope</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: error: ‘renWin’ was not declared in this scope</div><div>$HOME/build-VTK/Examples/Tutorial/Step1/Cxx/CMakeFiles/Cone.dir/Cone.cxx:74: error: ‘vtkRenderWindow’ is not a class or namespace</div><div>make[2]: *** [CMakeFiles/Cone.dir/Cone.cxx.o] Error 1</div><div>make[1]: *** [CMakeFiles/Cone.dir/all] Error 2</div><div>make: *** [all] Error 2</div></div><div><br></div><div>I have really no idea about the solution of this problem.</div><div>Sorry for my incompetence!</div><div>I'm looking forward to hear you.</div><div dir="ltr"><br></div><div dir="ltr">Thanks,<div>Paolo Grossi.</div></div></div></div>
</div></div>