[vtkusers] How to use VTK with Borland C++ Builder
Xianjin Yang
Yang at AGIUSA.COM
Fri Apr 2 10:47:16 EST 2004
How to USE VTK With Borland C++ Builder (BCB)
1) Download VTK source from http://www.vtk.org/get-software.php
Source code: VTK-X.XX-LatestRelease.tar.gz
Example data: VTKData-X.XX.tar.gz
Document: VTKDoc-X.XX.chm or HTML files
2) Download CMake from www.cmake.org
3) Install CMake.
4) Extract VTK source to C:\VTK.
5) Read \VTK\README.html, "Common Problems" section in particular for BCB
issues.
You have to convert Tcl libraires from coff to omf.
6) Create a new directory, e.g., C:\vtkbin, to store compiled VTK binary
files.
7) Unzip VTKData to C:\VTKData. Create VTK_DATA_ROOT environmental variable
from
Control Panel | Systems | Advanced | Environmental Variables | User
Variables
8) Run CmakeSetup with these optional Settings to create BCB makefiles.
Source code: c:\VTK
Binary: c:\vtkbin
Build For: Borland Makefiles
Show Advanced Values: Checked.
Click the Configure button
USE_SHARED_LIBS: OFF (you will use static VTK LIB's)
USE_SHARED_LIBS: ON (you will use dynamic VTK DLL's)
VTK_WRAP_TCL: ON (For running example TCL scripts)
TK_LIBRARY = C:\Program Files\Tcl\lib\bcbvtk\tk83.lib (converted above)
TCL_LIBRARY = C:\Program Files\Tcl\lib\bcbvtk\tcl83.lib (converted above)
VTK_USE_RENDERING: ON
VTK_USE_HYBRID: ON
VTK_DATA_ROOT: the path you set up at step (7) above.
Click the Confiure button until no Red fields, then the OK button.
9) Start Windows command prompt and go to C:\vtkbin, then type "make"
to compile VTK for BCB. This may take more than 2 hours.
10) Read \VTK\Examples\GUI\Win32\vtkBorland\Readme.txt 10 times.
11) Install vtkBorlandRenderWindow package found in
C:\VTK\Examples\GUI\Win32\vtkBorland\Package\vtkBorlandRenderWindowPkg.bpk
12) Run the Borland Demo Project_vtkDemo in
C:\VTK\Examples\GUI\Win32\vtkBorland\ProjectDemo
- Remove FormDestroy event and add the following FormClose event
to avoid some problem at exit.
void __fastcall TVTK_Form::FormClose(TObject *Sender, TCloseAction
&Action)
{
if (shrink) shrink->Delete();
vtkWindow1->GetRenderer()->RemoveAllProps();
vtkTimerLog::CleanupLog();
}
13) To compile CXX examples under C:\VTK\Examples
a) Start CMake, choose Borland Compiler, Source and BIN dir's,
b) Configure, Configure, and then OK.
c) From Windows Command Prompt, go to BIN dir, then type make.
d) Run EXE from either command prompt or double-click the EXE.
14) TO Learn more
a) Read VTK FAQ. http://public.kitware.com/cgi-bin/vtkfaq
b) Read and search the mailing list Archives
http://www.kitware.com/search.html
http://www.bioengineering-research.com/vtk/index.htm
http://public.kitware.com/pipermail/vtkusers/
http://news.gmane.org/gmane.comp.lib.vtk.user
c) Purchase the book "The Visualization Toolkit" ISBN 0-13-954694-4 from
amazon.com,
http://www.vtk.org/buy-books.php
d) Purchase the "VTK Users Guide" from Kitware.
http://www.kitware.com/products/vtkguide.html
e) Download the source code and/or binaries (available on Windows) and
work through
the examples (there are 400-500 examples).
http://www.vtk.org/get-software.php
f) To learn the innards of VTK, you can attend a VTK course or sponsor a
VTK course
at your site through Kitware.
http://www.kitware.com/products/index.html
Good luck.
Yang
-----Original Message-----
From: Howell wuhao1126 [mailto:wuhao1126 at hotmail.com]
Sent: Friday, April 02, 2004 8:45 AM
To: vtkusers at vtk.org
Subject: [vtkusers] How to use VTK in C++
i am apprentice, i want to know how to adopt VTK in c++ BUILDER?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040402/63fde39c/attachment.htm>
More information about the vtkusers
mailing list