VTK 5.10.1 VS2010 Configuration 配置
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 配置的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- VS2010/2012配置优化记录笔记
VS2010/2012配置优化记录笔记 在某些情况下VS2010/2012运行真的实在是太卡了,有什么办法可以提高速度吗?下面介绍几个优化策略,感兴趣的朋友可以参考下,希望可以帮助到你 有的时候V ...
- 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 ...
- [转]ubuntu 10.04下的配置tftp服务器
[转]ubuntu 10.04下的配置tftp服务器 http://www.cnblogs.com/geneil/archive/2011/11/24/2261653.html 第1步:安装tftp所 ...
- PCL+VS2010环境配置
PCL+VS2010环境配置 我本是效率至上的Linux党,但是PCL在Ubuntu下配置了几次都失败,不得不选择Windows 1.下载 http://go.rritw.com/www.pointc ...
- VS2010中配置OpenGL
下面将对VS2010中配置OpenGL进行简单介绍. 学习OpenGL前的准备工作第一步,选择一个编译环境现在Windows系统的主流编译环境有Visual Studio,Broland C++ Bu ...
随机推荐
- 【转】idea 用maven骨架生成项目速度慢的问题
转自:http://9leg.com/maven/2015/02/01/why-is-mvn-archetype-generate-so-low.html 最近从IntelliJ Idea 14的Co ...
- Java入门学习知识点汇总
Java入门重要知识点在这里总结一下,以方便日后复习,这部分内容主要有:变量和常量,常用的运算符,流程控制语句,数组,方法这些内容 一.变量和常量 1.Java关键字 先贴张图: 所有关键字区分大小写 ...
- Java for LeetCode 062 Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The ...
- 【JAVA、C++】LeetCode 017 Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent. A map ...
- 9.Python笔记之面向对象高级部分
类的成员 类的成员可以分为三大类:字段.方法和属性 注:所有成员中,只有普通字段的内容保存对象中,即:根据此类创建了多少对象,在内存中就有多少个普通字段.而其他的成员,则都是保存在类中,即:无论对象的 ...
- JavaScript封装成类
JavaScript在WEB编程中能起到很大的作用,将一些常用的功能写成JavaScript类库. 将下面代码保存为Common.js 类库功能: 1.Trim(str)--去除字符串两边的空格 2. ...
- [MAC] 在标题栏上显示目录完整路径
转载自 :http://www.cnblogs.com/yipu/archive/2013/03/13/2956957.html 当我们使用Finder浏览文件的时候,当前目录的名字会显示在标题栏顶端 ...
- java中值类型和引用类型的区别
[定义] 引用类型表示你操作的数据是同一个,也就是说当你传一个参数给另一个方法时,你在另一个方法中改变这个变量的值,那么调用这个方法是传入的变量的值也将改变. 值类型表示复制一个当前变量传给方法,当你 ...
- loj 1055(bfs)
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=26772 思路:注意判重就行,开个6维数组记录3个robots的位置 ...
- 建模算法(八)——插值
插值:求过已知有限个数据点的近似函数 拟合:已知有限个数据点,求近似函数,不要求过已知数据点,只要求在某种意义下在这些点的误差最小 (一)插值方法 一.拉格朗日多项式插值 1.插值多项式 就是做出一个 ...