Download VTK 5.10.1

Download VS2010

Download CMake 3.2.0

I assume you've already installed VS2010 and CMake 3.2.0 correctly.

Compile the VTK:

Start CMake 3.2.0, fill the source and destination:

source: C:/VTK5.10.1/VTK5.10.1

destination: C:/VTK5.10.1/VS2010

Click Configure and use Visual Studio 10 2010 to complie.

When first configure is done, select Grouped and Advanced.

BUILD_EXAMPLES          [ON]
BUILD_TEST [ON]
CMAKE_INSTALL_PREFIX [C:/VTK5.10.1/VS2010_install]
CMAKE_USE_PTHREADS [OFF]
CMAKE_USE_WIN32_THREADS [ON]

click Configure again.

After configure is done (No errors show), click Generate.

Go back to your build folder, open VTK.sln, right click ALL_BUILD, choose Rebuild.

Wait a long time for make process, have a cup of coffee :)

After rebuild is done, right click INSTALL, choose Build.

Now, the configuration is done, enjoy it :)

Create a new empty project,

Project->Project Property->Configuration Properties->VC++Directories ->Include Directories:

C:\VTK5.10.1\VS2010
C:\VTK5.10.1\VS2010\bin
C:\VTK5.10.1\VTK5.10.1\GenericFiltering
C:\VTK5.10.1\VTK5.10.1\Common
C:\VTK5.10.1\VTK5.10.1\IO
C:\VTK5.10.1\VTK5.10.1\Filtering
C:\VTK5.10.1\VTK5.10.1\Rendering
C:\VTK5.10.1\VTK5.10.1\Graphics
C:\VTK5.10.1\VTK5.10.1\olumeRendering
C:\VTK5.10.1\VTK5.10.1\Imaging
C:\VTK5.10.1\VTK5.10.1\Hybrid
C:\VTK5.10.1\VTK5.10.1\GUISupport
C:\VTK5.10.1\VTK5.10.1\Utilities
C:\VTK5.10.1\VS2010\Utilities
C:\VTK5.10.1\VTK5.10.1\Parallel
C:\VTK5.10.1\VTK5.10.1\Widgets
C:\VTK5.10.1\VS2010_install\include\vtk-5.10

Project->Project Property->Configuration Properties->VC++Directories ->Library Directories:

C:\VTK5.10.1\VS2010\bin\Release

Project->Project Property->Configuration Properties->Linker->Input:

opengl32.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
vtkCommon.lib
vtkDICOMParser.lib
vtkexoIIc.lib
vtkexpat.lib
vtkFiltering.lib
vtkfreetype.lib
vtkftgl.lib
vtkGenericFiltering.lib
vtkGraphics.lib
vtkHybrid.lib
vtkImaging.lib
vtkIO.lib
vtkjpeg.lib
vtkNetCDF.lib
vtkpng.lib
vtkRendering.lib
vtksys.lib
vtktiff.lib
vtkVolumeRendering.lib
vtkWidgets.lib
vtkzlib.lib

Create a test.cpp file as below:

#include <vtkConeSource.h>
#include <vtkPolyData.h>
#include <vtkSmartPointer.h>
#include <vtkPolyDataMapper.h>
#include <vtkActor.h>
#include <vtkRenderWindow.h>
#include <vtkRenderer.h>
#include <vtkRenderWindowInteractor.h> int main(int, char *[])
{
//Create a cone
vtkSmartPointer<vtkConeSource> coneSource =
vtkSmartPointer<vtkConeSource>::New();
coneSource->Update(); //Create a mapper and actor
vtkSmartPointer<vtkPolyDataMapper> mapper =
vtkSmartPointer<vtkPolyDataMapper>::New();
mapper->SetInputConnection(coneSource->GetOutputPort()); vtkSmartPointer<vtkActor> actor =
vtkSmartPointer<vtkActor>::New();
actor->SetMapper(mapper); //Create a renderer, render window, and interactor
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkRenderWindow> renderWindow =
vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
renderWindowInteractor->SetRenderWindow(renderWindow); //Add the actors to the scene
renderer->AddActor(actor);
renderer->SetBackground(., ., .); // Background color dark red //Render and interact
renderWindow->Render();
renderWindowInteractor->Start(); return EXIT_SUCCESS;
}

If error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' occurs, please see solution here.

VTK 5.10.1 VS2010 Configuration 配置的更多相关文章

  1. FLTK 1.1.10 VS2010 Configuration 配置

    Download FLTK 1.1.10 at here. Download VS2010 Download CMake 2.8.12 I assume you've already installe ...

  2. ITK 3.20.1 VS2010 Configuration 配置

    Download ITK 3.20.1 Download VS2010 Download CMake 3.2.0 I assume you've already installed VS2010 an ...

  3. VTK 6.3.0 Qt 5.4 MinGW 4.9.1 Configuration 配置

    Download VTK 6.3.0 Download Qt 5.4 with MinGW 4.9.1 Download CMake 3.2.0 I assume you've already ins ...

  4. win7&win8.1 x64位系统下在VS2010下配置MPICH2&测试&解决scanf不能输入

    1.       Mpich下载地址http://www.mpich.org/downloads/,下载mpich2-1.4.1p1-win-x86-64(32位系统请下载mpich2-1.4.1p1 ...

  5. VS2010/2012配置优化记录笔记

    VS2010/2012配置优化记录笔记 在某些情况下VS2010/2012运行真的实在是太卡了,有什么办法可以提高速度吗?下面介绍几个优化策略,感兴趣的朋友可以参考下,希望可以帮助到你   有的时候V ...

  6. ITK 4.8.1 Qt 5.4 MinGW 4.9.1 Configuration 配置

    Download ITK 4.8.1 Download Qt 5.4 with MinGW 4.9.1 Download CMake 3.2.0 I assume you've already ins ...

  7. [转]ubuntu 10.04下的配置tftp服务器

    [转]ubuntu 10.04下的配置tftp服务器 http://www.cnblogs.com/geneil/archive/2011/11/24/2261653.html 第1步:安装tftp所 ...

  8. PCL+VS2010环境配置

    PCL+VS2010环境配置 我本是效率至上的Linux党,但是PCL在Ubuntu下配置了几次都失败,不得不选择Windows 1.下载 http://go.rritw.com/www.pointc ...

  9. VS2010中配置OpenGL

    下面将对VS2010中配置OpenGL进行简单介绍. 学习OpenGL前的准备工作第一步,选择一个编译环境现在Windows系统的主流编译环境有Visual Studio,Broland C++ Bu ...

随机推荐

  1. com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。

    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document fro ...

  2. ECharts2.2.0 兼容IE8

    IE 8,ECharts2.2.0 版本,demo的各个功能均正常显示在IE8上面, 但是我在真正做的时候,我的html却不能显示,画面乱了,而且function也不能用, 都准备用1.4.1版本了, ...

  3. 解决kettle配置文件中的中文乱码

    在日常开发中有时候配置文件会出现中文(如config.properties 里有中文),为了避免出现乱码,因而要转成unicode编码. 1.在设置变量的javascript(转换中的JavaScri ...

  4. atan函数与atan2函数

    atan函数:传送门. atan2函数:传送门. atan 和 atan2 都是求反正切函数,如:有两个点 point(x1,y1), 和 point(x2,y2); 那么这两个点形成的斜率的角度计算 ...

  5. [Android Pro] Android 打包流程

    Android 打包流程: 官网地址:http://developer.android.com/tools/building/index.html 具体的打包步骤如下: 1:生成R.java类文件:E ...

  6. 解决 Eclipse “alt+/”快捷键 无效

    解决方案: 1. 检查windows ——preferences ——java ——editor —— content assist - advanced,在右上方有一行“select the pro ...

  7. ECSHOP去版权与标志

    前台部分: 1:去掉头部TITLE部分的ECSHOP演示站 Powered by ecshop 前者在后台商店设置 - 商店标题修改 后者打开includes/lib_main.php $page_t ...

  8. Maven使用笔记(四)pom.xml配置详解

    pom.xml文件配置详解 --声明规范 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" ...

  9. [译]SQL Server 之 查询计划的简单参数化

    SQL Server能把一些常量自动转化为参数,以重用这些部分的查询计划. SELECT FirstName, LastName, Title FROM Employees WHERE Employe ...

  10. C# 常用正则表达式

    // 匹配移动手机号 @"^1(3[4-9]|5[012789]|8[78])\d{8}$"; // 匹配电信手机号   @"^18[09]\d{8}$";   ...