[vtkusers] Recipe for building VTK-5.6.1 with C++ Builder XE (bcc32 6.31)
Oliver Weinheimer
mail at oliwe.com
Wed Jan 12 03:55:45 EST 2011
Recipe for building VTK-5.6.1 with C++ Builder XE (bcc32 6.31)
(Tested on Win 7)
[A] Download vtk-5.6.1.zip
[B] Download and installation of cmake 2.8.3
[C] Running CMake
Changing Options:
- CMake_Build_Type Release or Debug
- All Compiler and Linker Flags -tWM changed to -tM and -tWC (windows
console app) added
- Optionally add -tR for compiling with RTL, or -tD for comiling as Shared
Lib)
- Don't mark 'BUILD_SHARED_LIBS' in CMake
[D] Open cmd.exe in Vtk binaries directory and type in "make"
[E] Compilation and linking: Fix Errors
a)
Embarcadero C++ 6.31 for Win32 Copyright (c) 1993-2010 Embarcadero
Technologies,
Inc.
E:\Kitware\vtk-5.6.1\Utilities\vtknetcdf\attr.c:
Error E2176 E:\Kitware\vtk-5.6.1\Utilities\vtknetcdf\utf8proc.h 70: Too many
types
in declaration
Error E2146 E:\Kitware\vtk-5.6.1\Utilities\vtknetcdf\utf8proc.h 70: Need an
identifier to declare
-> add
# define HAVE__BOOL to utf8proc.h
(because XE was shipped without stdbool.h, but bool is defined elsewhere)
b)
E:\Kitware\vtk-5.6.1\Utilities\vtknetcdf\posixio.c:
Error E2209 E:\Kitware\vtk-5.6.1\Utilities\vtknetcdf\posixio.c 21: Unable to
open
include file 'unistd.h'
#ifdef _MSC_VER
changed to
#ifdef __BORLANDC__
in line 18
c)
vtkExtractSelectedIds.cxx
all lines with
static_cast<VTK_TT1>((static_cast<VTK_TT2*>(labelVoid)[labelArrayIndex])));
changed to
static_cast<VTK_TT1*>(labelVoid)[labelArrayIndex]);
(not sure if this is semantically correct, but it compiles)
d)
vtkYoungsMaterialInterface.h
#ifdef __BCPLUSPLUS__
#include <malloc.h>
#endif
at line 51, after:
(forum entry of Alessandro Martini)
e)
Fatal F1008 E:\Kitware\vtk-5.6.1\IO\vtkFLUENTReader.cxx 2346: Out of memory
in
function vtkFLUENTRea
der::LoadVariableNames()
I excluded (because i never needed this classes until now:
vtkFLUENTReader.cxx
vtkOpenFOAMReader.cxx
f)
Added
#include <ctype.h>
to
\Kitware\VTK-5.6.0\IO\vtkArrayReader.cxx
because isspace was not found
g)
last line in cmd:
[100%] Built target vtkCharts
-> :-)
[F]
[Building vtkBorlandRenderWindowPkg.bpk in C++ Builder XE IDE
Set system variables VTK_SOURCE and VTK_BIN
Open C++ Builder IDE
New Package
Add to Project vtkBorlandRenderWindowPkg.cpp
Add to Include Path in C++ Builder IDE
$(VTK_SOURCE)\Common
$(VTK_SOURCE)\Rendering
$(VTK_SOURCE)\Filtering
$(VTK_BIN)
$(VTK_BIN)\Rendering;
#include <vcl\Sysutils.hpp>
changed to
#include <Sysutils.hpp>
in vtkBorlandRenderWindow.cpp
Add to Project VTK-libs
vtkCommon.lib
vtksys.lib
vtkRendering.lib
vtkFiltering.lib
Make Project
Component->Install Packages Add vtkBorlandRenderWindowPkg.bpl
--
View this message in context: http://vtk.1045678.n5.nabble.com/Recipe-for-building-VTK-5-6-1-with-C-Builder-XE-bcc32-6-31-tp3337807p3337807.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list