<html>
<body>
<font size=3>Hi Martin,<br><br>
I think you forgot the template argument:<br><br>
template&lt; class TSpatialObject &gt;<br>
class ITK_EXPORT TanimotoSpatialObjectSimilarityCoefficient : public
SpatialObjectSimilarityCoefficient {<br><br>
should probably be:<br><br>
template&lt; class TSpatialObject &gt;<br>
class ITK_EXPORT TanimotoSpatialObjectSimilarityCoefficient : <br>
&nbsp; public SpatialObjectSimilarityCoefficient&lt; TSpatialObject
&gt;<br>
{<br><br>
<br><br>
Regards,<br>
Stefan<br><br>
<br><br>
<br><br>
At 01:36 26/04/06, you wrote:<br>
<blockquote type=cite class=cite cite>Hi,<br><br>
I would very much appreciate if some could help me with compilation
problem I <br>
have. Perhaps it's a bit late (2.30 am) and I am not able find out
myself, <br>
where is the issue.<br><br>
I use Gentoo linux, gcc-3.4.5 and ITK-2.6.0. I set up a project, where I
<br>
define a class A (inheriting from itkObject) and class B (inheriting from
A). <br>
In this configuration I am not able to compile a test file for B. If I
<br>
implement everything in A, the code compiles.<br><br>
Here is the compiler output:<br><br>
c++ -ftemplate-depth-50 -g -I/opt/ITK_debug/Utilities/vxl/core <br>
-I/opt/ITK_debug/Utilities/vxl/vcl -I/opt/ITK-2.6.0/Utilities/vxl/core
<br>
-I/opt/ITK-2.6.0/Utilities/vxl/vcl -I/opt/ITK-2.6.0/Utilities <br>
-I/opt/ITK_debug/Utilities -I/opt/ITK_debug/Utilities/gdcm <br>
-I/opt/ITK-2.6.0/Utilities/nifti/znzlib <br>
-I/opt/ITK-2.6.0/Utilities/nifti/niftilib
-I/opt/ITK-2.6.0/Utilities/expat <br>
-I/opt/ITK_debug/Utilities/expat -I/opt/ITK_debug/Utilities/DICOMParser
<br>
-I/opt/ITK-2.6.0/Utilities/DICOMParser -I/opt/ITK-2.6.0/Utilities/NrrdIO
<br>
-I/opt/ITK-2.6.0/Utilities/MetaIO -I/opt/ITK-2.6.0/Code/SpatialObject
<br>
-I/opt/ITK-2.6.0/Code/Numerics/NeuralNetworks <br>
-I/opt/ITK-2.6.0/Code/Numerics/Statistics
-I/opt/ITK-2.6.0/Code/Numerics/FEM <br>
-I/opt/ITK-2.6.0/Code/IO -I/opt/ITK-2.6.0/Code/Numerics <br>
-I/opt/ITK-2.6.0/Code/Common -I/opt/ITK-2.6.0/Code/BasicFilters <br>
-I/opt/ITK-2.6.0/Code/Algorithms -I/opt/ITK_debug -ggdb -Wall -o <br>
CMakeFiles/itkTanimotoSpatialObjectSimilarityCoefficient.dir/itkTanimotoSpatialObjectSimilarityCoefficient.o
<br>
-c
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.cxx<br>
In file included <br>
from
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.cxx:21:<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:29:
<br>
error: expected class-name before '{' token<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:34:
<br>
error: `SpatialObjectSimilarityCoefficient' does not name a type<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:44:
<br>
error: `Superclass' has not been declared<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:44:
<br>
error: expected nested-name-specifier before
&quot;CoefficientType&quot;<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:44:
<br>
error: `CoefficientType' does not name a type<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:46:
<br>
error: `Superclass' has not been declared<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:46:
<br>
error: expected nested-name-specifier before
&quot;SpatialObjectType&quot;<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:46:
<br>
error: `SpatialObjectType' does not name a type<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:47:
<br>
error: `Superclass' has not been declared<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:47:
<br>
error: expected nested-name-specifier before &quot;PixelType&quot;<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:47:
<br>
error: `PixelType' does not name a type<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:48:
<br>
error: `Superclass' has not been declared<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:48:
<br>
error: expected nested-name-specifier before &quot;Pointer&quot;<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:48:
<br>
error: `Pointer' does not name a type<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:49:
<br>
error: `Superclass' has not been declared<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:49:
<br>
error: expected nested-name-specifier before
&quot;ConstPointer&quot;<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:49:
<br>
error: `ConstPointer' does not name a type<br>
/home/kavec/Projects/itkSpatialObjectSimilarityCoefficient/itkTanimotoSpatialObjectSimilarityCoefficient.h:51:
<br>
error: expected `,' or `...' before '*' token<br><br>
I also attach the sources and CMakeList.txt.<br><br>
Thanks in advance.<br><br>
Martin<br><br>
<br><br>
<br><br>
<br>
_______________________________________________<br>
Insight-users mailing list<br>
Insight-users@itk.org<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" eudora="autourl">http://www.itk.org/mailman/listinfo/insight-users</a></blockquote><br><br>
<br>
</font></body>
<br>
</html>