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 ...
随机推荐
- Remove Duplicates from Sorted List | & ||
Remove Duplicates from Sorted List I Given a sorted linked list, delete all duplicates such that eac ...
- com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: 3 字节的 UTF-8 序列的字节 3 无效。
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document fro ...
- static-const 类成员变量
[本文链接] http://www.cnblogs.com/hellogiser/p/static-const.html [分析] const数据成员必须在构造函数初始化列表中初始化; static数 ...
- Android 阅读Tasks and Back Stack文章后的重点摘抄
这篇文章是做android的必读篇目,要仔细阅读,原文连接http://developer.android.com/guide/components/tasks-and-back-stack.html ...
- Java for LeetCode 064 Minimum Path Sum
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which ...
- 分类and分类延展
1.Category简介 Category,又称为类别&类目&分类,是OC特有语法,在不修改原有类的基础上增加新的方法,一个庞大的类可以多人来分模块开发,有助于团队合作,或者对当前类方 ...
- Android之ScrollView
1.ScrollView和HorizontalScrollView是为控件或者布局添加滚动条 2.上述两个控件只能有一个孩子,但是它并不是传统意义上的容器 3.上述两个控件可以互相嵌套 4.滚动条的位 ...
- SQL Server连接数据库失败,可能的问题!
SQL Server Configuration Manager中启动服务 SQL Server外围应用配置器中,打开远程IP连接属性 别的应该没什么问题了!
- 【HTML5】Canvas画布
什么是 Canvas? HTML5 的 canvas 元素使用 JavaScript 在网页上绘制图像. 画布是一个矩形区域,您可以控制其每一像素. canvas 拥有多种绘制路径.矩形.圆形.字符以 ...
- SparkStreaming+Flume出现ERROR ReceiverTracker: Deregistered receiver for stream 0: Error starting receiver 0 - org.jboss.netty.channel.ChannelException
文章发自http://www.cnblogs.com/hark0623/p/4204104.html ,转载请注明 我发现太多太多的坑要趟了… 向yarn提交sparkstreaming了,提交脚本如 ...