[Insight-developers] Borland sees pure virtual class where none exists?

Kent Williams norman-k-williams at uiowa.edu
Mon Oct 31 13:35:31 EST 2005


I've done some investigations with the Borland compiler:

1. itkOrientationAdapter.h and itkSpatialOrientationAdapter.h/txx do in 
fact compile and link just fine. The SpatialOrientationAdapter is used 
by NiftiImageIO, and Code/IO compiles fine.

2. I checked in a new version of itkQuaternionOrientationAdapter.h that 
moves the definition of the OrientationType outside the template class 
definition.  Now the test itkQuaternionOrientationAdapterTest.cxx (in 
Testing/Code/Common) at least acknowledges that 
itk::QuaternionOrientationAdapter<3> is a legitimate type, but there are 
nonsensical errors later in the code when it tries to use the 
DirectionType defined in QuaternionOrientationAdapter and 
SpatialOrientationAdapter.

3. I found that the problems compiling 
itkQuaternionOrientationAdapterTest.cxx was that BCC gets confused by 
typedefs that rename types defined inside template classes. Now I can 
compile the test, but the link fails with this message:

Linking CXX executable bin\itkCommonTests.exe
        "C:\Program Files\CMake 2.2\bin\cmake.exe" -E remove -f 
bin\itkCommonTests.exe
        bcc32 @MAKE0158.@@@
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Fatal: Error detected (LME351)
Warning: Cannot reserve virtual memory at addr 720B0000 for -720896 
bytes (errcode 87)

I haven't checked the new test in, and the CVS version of the 
Code/Common/itkCommonTest.cxx doesn't reference it.  Is there a trick to 
configuring BCC32 so that it doesn't run into the incremental link problem?

Bill Lorensen wrote:

> We should remove this class until we resolve the problem. People get 
> erroneous e-mails. Then they start ignoring them.
> If you can't do it today (or fix it), I'll remove it tomorrow.



More information about the Insight-developers mailing list