VTK Configuration Summary

Source: Internet
Author: User
Tags visual studio 2010

Here's just a record.

Previously configured, re-install the system, re-install the VS2010, once again open the previously written VC program, compilation can not pass,

This compilation took nearly half a day. Not worth the candle.

First, or press VTK to install the three-step (VS2010).

The installation section is from the network, and the pro-test is available.

1. Install the Vtk-win32.exe, install to the D:\VTK, the directory as short as possible, because the subsequent reference more convenient.
2. Extract the VTK source code to the D:\vtk\sourcecode
3. Download Vtkdata.zip, which is the data required for the VTK example, extracted to D:\vtk\vtkdata
4. Installing CMake
5. Install Visual Studio 2010
6. Running CMake
7. Select the "D:/vtk/sourcecode" directory in the first text box "where is the source code".
8. Select the output directory in the second text box "where to build the binaries", for example: "D:/vtk/bin"
9. Click "Configure" button, select "Visual Studio" (VS2010), then, CMake will be scanning the system, after the stop, we can modify the CMake option. In the course of scanning, no matter what error, no matter what error will lead to the subsequent compilation of VTK.DSW errors, even if the scan is complete. If there is an error, you should remove all files and folders except Vtk.exe in the D:\vtk\bin\ directory and re-configure.
10. View the options in the list, vtk_data_root, browse to the location of the example data, such as "D:\vtk\vtkdata"
11.build_examples: Tick The compile example,
12.build_testing: Check to compile the test code, is also an example
13.vtk_use_parallel: Tick
14.build_shared_libs: Set to ON, will generate more DLL files, these DLLs need to be copied to the Windows/system directory. If you use a static library to program, that is off, the application can run independently, the size is also larger, if the dynamic library programming, that is on, the application must find a dynamic library to run, but the size can be done relatively small.
15. Click "Advanced" option, find Vtk_use_guisupport: Many people put VTK installed, but can not run VTK with MFC mixed programming example, the error is missing vtkmfc.lib, the problem is in this option, we must set it to On, after configure, a new option VTK_USE_MFC will appear, set it to ON
16. After modifying the CMake option, press the Configure button until no option is indicated as red
17. Click the "Generate" button to generate files such as Vtk.sln in the bin directory.
18. Compile the VTK.sln file in the Bin directory with Visual Studio 2010 to build the solution for a long time. The results are saved in the. The D:\vtk\bin\bin directory.


Note: If an error occurs at compile time, it is due to the fact that Windows IE version of the truth is too low for vs2008, prompting a bug in the SDK. Locate the VtkMFCwindow.cpp, and modify the previous macro definition to:

#ifndef WINVER
#define WINVER 0x0501//You can change to a later version
#endif

#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500//I changed it.
#endif

19. After the build succeeds, open the solution install.vcproj under VS2010, and then build the solution. It would be very smooth to execute install.vcproj on the past, without errors.
20. Copy all Files D:\vtk\bin\bin\debug This folder to all DLL suffixes in the C:\Windows\System32 (recommended during debugging), or copy to the VC project executable location (copy when installing to another machine).

The above is from the network, not original, pro-test available. To avoid cloud loss, special copy.

The following is your own configuration

Complete ICPTESTUSINGVTK configuration in VC project

. In the additional include directories, general, C + +, add a table of contents

d:/vtk2010/bin;d:/vtk2010/bin/common;d:/vtk2010/bin/utilities;d:/vtk2010/bin/volumerendering;d:/vtk2010/bin/ rendering;d:/vtk2010/bin/charts;d:/vtk2010/bin/guisupport/mfc;d:/vtk2010/bin/utilities/vtkalglib;d:/vtk2010/ Source_code/infovis;d:/vtk2010/source_code/geovis;d:/vtk2010/source_code/views;d:/vtk2010/source_code/parallel ;d:/vtk2010/source_code/volumerendering;d:/vtk2010/source_code/hybrid;d:/vtk2010/source_code/widgets;d:/ vtk2010/source_code/rendering;d:/vtk2010/source_code/charts;d:/vtk2010/source_code/rendering/testing/cxx;d:/ vtk2010/source_code/io;d:/vtk2010/source_code/imaging;d:/vtk2010/source_code/graphics;d:/vtk2010/source_code/ genericfiltering;d:/vtk2010/source_code/filtering;d:/vtk2010/source_code/common;d:/vtk2010/source_code/ Utilities;d:/vtk2010/source_code/common/testing/cxx;d:/vtk2010/bin/utilities/vtklibproj4;d:/vtk2010/source_ Code/utilities/vtklibproj4;d:/vtk2010/bin/utilities/dicomparser;d:/vtk2010/source_code/utilities/dicomparser;d :/vtk2010/bin/utilities/vtkfreetype/include;d:/vtk2010/source_code/utilities/vtkfreetype/include;d:/vtk2010/bin/utilities/materiallibrary;d:/ vtk2010/source_code/utilities/materiallibrary;d:/vtk2010/bin/utilities/verdict;d:/vtk2010/source_code/ utilities/verdict;d:/vtk2010/bin/utilities/vtkhdf5;d:/vtk2010/source_code/utilities/vtkhdf5;d:/vtk2010/bin/ utilities/vtkhdf5/src;d:/vtk2010/source_code/utilities/vtkhdf5/src;d:/vtk2010/bin/utilities/cosmo;d:/vtk2010/ source_code/utilities/cosmo;d:/vtk2010/bin/utilities/vpic;d:/vtk2010/source_code/utilities/vpic;d:/vtk2010/ source_code/utilities/utf8/source;d:/vtk2010/source_code/guisupport/mfc;d:/vtk2010/source_code/utilities/ vtkalglib;% ( Additionalincludedirectories)

Added in linker "->general", "Additional directory"

d:\vtk2010\bin\bin\Release\;

Adding in linker->input-> Additional dependencies

Vtkcommon.lib;vtkdicomparser.lib;vtkexoiic.lib;vtkexpat.lib;vtkfiltering.lib;vtkfreetype.lib;vtkftgl.lib; Vtkgenericfiltering.lib;vtkgraphics.lib;vtkhybrid.lib;vtkimaging.lib;vtkinfovis.lib;vtkio.lib;vtkjpeg.lib; Vtklibxml2.lib;vtkmetaio.lib;vtknetcdf.lib;vtkpng.lib;vtkrendering.lib;vtksqlite.lib;vtksys.lib;vtktiff.lib; Vtkverdict.lib;vtkviews.lib;vtkvolumerendering.lib;vtkwidgets.lib;vtkzlib.lib;.

The back is OPENCV, can not be considered

\opencv210\lib\cv210.lib;. \opencv210\lib\cvaux210.lib;. \opencv210\lib\cxcore210.lib;. \opencv210\lib\highgui210.lib;. \woomvdisplay010\woomvimageshow.lib;. \wmvroitools0.1\wmvisionroitools.lib;% ( Additionaldependencies)





VTK Configuration Summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.