[vtkusers] Support of C++ Builder with VTK 5.10 and newer

James Johnston JamesJ at motionview3d.com
Tue Sep 4 16:41:09 EDT 2012


Hi,

We've previously been using VTK 5.4.2 with Borland C++ Builder 5.  This
configuration has been compiled without any issues.  Of course, both these
products are looking rather old and so I'm looking to update our projects.
Now, I've been trying to compile VTK 5.10 in Embarcadero C++ Builder XE2.
Unfortunately this has not been without issues.  Searching online, the
last/only I can find mention of using newer versions of VTK in C++ Builder
is:

http://www.vtk.org/pipermail/vtkusers/2011-December/120492.html

That page seems to list a number of issues, some of which I'm running into
as well.  Besides the set of issues with HDF5 (new since VTK 5.4
apparently), the internal compiler error on vtkExtractSelectedIds turned
into this with VTK 5.10 / C++ Builder XE2:

C:\Users\JamesJ\Documents\Repositories\VTK-source\VTK\Graphics\vtkExtractSel
ectedIds.cxx:
Error E2027
C:\Users\JamesJ\Documents\Repositories\VTK-source\VTK\Graphics\vtkExtractSel
ectedIds.cxx 337: Must take address of a memory location in function void
vtkExtractSelectedIdsExtractCells<vtkStdString,vtkStdString>(vtkExtractSelec
tedIds *,int,int,vtkDataSet *,vtkIdTypeArray *,vtkSignedCharArray
*,vtkSignedCharArray *,int,vtkStdString *,vtkStdString *)
Error E2342
C:\Users\JamesJ\Documents\Repositories\VTK-source\VTK\Graphics\vtkExtractSel
ectedIds.cxx 337: Type mismatch in parameter '_Right' (wanted 'const
std::string &', got 'vtkStdString') in function void
vtkExtractSelectedIdsExtractCells<vtkStdString,vtkStdString>(vtkExtractSelec
tedIds *,int,int,vtkDataSet *,vtkIdTypeArray *,vtkSignedCharArray
*,vtkSignedCharArray *,int,vtkStdString *,vtkStdString *)

The error seems dubious as the code looks valid upon further examination:
the template function is indeed instantiated with vtkStdString; I don't see
why it would be trying to do things with a std::string.  (Makes me wonder
whether templates are problematic in C++ Builder XE2?)

So, some questions:

1.  I searched online for a list of supported compilers to use with VTK but
I can't find any such authoritative list.  Does such a list exist, and if
so, where is it?

2.  Is C++ Builder still supported or not?  It certainly seemed to be in the
past - for example, the vtkBorlandRenderWindow GUI project is still in the
repository, although nobody seems to have updated it at all for newer
versions of the compiler beyond C++ Builder 6.  And we've used it ourselves,
as well.  I did notice that C++ Builder doesn't seem to be on CDash any
more: http://open.cdash.org/index.php?project=VTK so maybe that's why some
of these problems crept in.  If not, can some of the newer versions of the
compiler again be supported? 

Best regards,

James Johnston





More information about the vtkusers mailing list