VTK/Building: Difference between revisions

From KitwarePublic
< VTK
Jump to navigationJump to search
No edit summary
m (moved VTK/Building VTK to VTK/Building: The " VTK" was redundant in the page title)
 
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Building VTK CVS on Win32 ==
== Platforms ==


'''Does not require the use of a CVS client'''
* [[VTK/Building/Linux|Linux]]
* [[VTK/Building/MacOSX|Mac OS X]]
* [[VTK/Building/Windows|Microsoft Windows]]


=== Step 1 ===
{{VTK/Template/Footer}}
Download VTK [http://public.kitware.com/VTK/files/nightly/vtkNightlyDoc.tag.gz vtkNightlyDoc.tag.gz] and unpack the archive into C:\MyProjects\VTKCVS
 
This archive is generated every night from the CVS of VTK. It contains exactly what you would get if you were to use a cvs client to download VTK from the cvs server.
 
=== Step 2 ===
Download CMake (CMake 2.4.4) from http://cmake.org/HTML/Download.html. Choose the windows installer (cmake-2.4.4-win32.exe) and install it.
 
=== Step 3 ===
 
Create a folder C:\MyProjects\VTKCVSBin. This will store the compiled binaries
 
=== Step 4 ===
 
Start CMake, provide the source codes and binaries paths to CMake. Then press Configure button to let CMake read the CMakeLists.txt from the source path and configure the variables. In your case you should have:
 
Where is the source code: C:\MyProjects\VTKCVS
Where to build the binaries: C:\MyProjects\VTKCVSBin
 
Once you hit 'Configure', make sure to turn on:
* BUILD_SHARED_LIBS
this causes the VTK dlls to be built. You should not change anything else.
 
=== Step 5 ===
 
Open the VTK.sln (VTK.dsw for the old VS6) from C:\MyProjects\VTKCVSBin using VS .Net 2003 and build it. You can choose either to build in Release or Debug (prefer release since the code will be faster).
 
=== Step 6 ===
 
Installation, the VTK dll will be in C:\MyProjects\VTKCVSBin\bin\release, therefore by default the system cannot find them. You have the choice in either copying the dll to c:\windows\system32 or change the environment variable PATH to include the path: C:\MyProjects\VTKCVSBin\bin\release
 
'''Be very careful if you have multiple VTK installed on your system that you are using the right one'''. It is strongly suggested that only one version of the VTK dll be on one system.
 
=== Step 7 ===
 
When building your project if you don't use CMake, make sure that 'Additional Include Directories' and 'Additional Library Directories' (from within the Visual Studio interface) are pointing to the proper path of VTKCVS and not the old VTK 4.4 or VTK5
 
 
== Links ==
* [http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=502 Installing VTK 4.1.x on a windows PC]
* [http://www.spinet.pl/~wilku/vtk-howto/ How to build VTK with Java support on Windows]

Latest revision as of 18:21, 7 September 2011