[vtkusers] [FORGED] Programming in Visual studio - How to include all the required directories in Visual studio.
Gib Bogle
g.bogle at auckland.ac.nz
Wed Jun 22 22:41:25 EDT 2016
You definitely want to use cmake. It makes the task very easy.
Here is the contents of CMakeLists.txt to build a simple program:
cmake_minimum_required(VERSION 2.8)
PROJECT(TensorGlyph)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
add_executable(TensorGlyph TensorGlyph.cxx)
target_link_libraries(TensorGlyph ${VTK_LIBRARIES})
You will generate the VS project files by a command like this (in the directory that holds CMakeLists.txt):
cmake -G "Visual Studio 2013"
I initially resisted using cmake when I started working with ITK and VTK, but I quickly came to see the error of my ways. Everybody will give you the same advice.
Gib
________________________________
From: vtkusers [vtkusers-bounces at vtk.org] on behalf of bhanu kiran chaluvadi [nthdimensionalreality at gmail.com]
Sent: Thursday, 23 June 2016 2:29 p.m.
To: vtkusers at vtk.org
Subject: [FORGED] [vtkusers] Programming in Visual studio - How to include all the required directories in Visual studio.
Hi,
I am new to VTK.
I am using VTK - 6.3.0 along with visual studio 2013. I don't have much knowledge in cmake.
I am able to build VTK and run all the example(present in bin folder) by following some youtube tutorials.
Now i want to create by own sample project. I want to include "vtkRenderer.h" in my program(for example)..
As usual in visual studio -> properties i included the path where the program can find vtkRenderer.h
But vtkRenderer.h itself has 4 included header files
#include "vtkRenderingCoreModule.h" // For export macro
#include "vtkViewport.h"
#include "vtkVolumeCollection.h" // Needed for access in inline members
#include "vtkActorCollection.h"
And Each of the above header file has further more included header file..and this continued...
I will not be able to include the paths for each header file. since they are so many(more than 50)of them
Is there any way around this ?
i.e. if i
#include <vtkRenderer.h>
It should include all its dependency files.
Please help.
Thanks
BhanuKIran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160623/e80f7d5d/attachment.html>
More information about the vtkusers
mailing list