[Insight-users] Compiling itk on Solaris using Forte 6 or Forte 7 (new One Studio) Compilers

Martin Styner martin_styner at ieee . org
Mon, 12 Aug 2002 11:23:40 +0200


Hi

I was using itk for a while now compiling with g++ 2.95.2 and I did not 
have compiling problems in general. But, we have switched to using Sun's 
compiler set One Studio (formerly callled Forte 7, CC and cc). My 
machine is a SUN Blade 100, Solaris 8.

Whether I use Forte 7 or Forte 6 compilers, I always get the same 
problems. To be sure, I downloaded a whole new cvs tree, ccmake, same 
settings as with g++ (except for the CXXFLAGS and CFLAGS), same problem. 
There seems to be a template problem while compiling 
itkQuaternionRigidTransformGradientDescentOptimizer in Code/Numerics :

"/home/encephalon/mstyner/itk/Insight_Nightly/Insight/Code/Numerics/vxl/vnl/vnl_vector_fixed.h", 
line 136: Error: "friend" declaration is incompatible with function 
template.
"/home/encephalon/mstyner/itk/Insight_Nightly/Insight/Code/Numerics/vxl/vnl/vnl_quaternion.h", 
line 57:     Where: While specializing "vnl_vector_fixed<double, 4>".
"/home/encephalon/mstyner/itk/Insight_Nightly/Insight/Code/Numerics/vxl/vnl/vnl_quaternion.h", 
line 57:     Where: Specialized in vnl_quaternion<double>.
"/home/encephalon/mstyner/itk/Insight_Nightly/Insight/Code/Numerics/itkQuaternionRigidTransformGradientDescentOptimizer.cxx", 
line 77:     Where: Specialized in non-template code.
"/home/encephalon/mstyner/itk/Insight_Nightly/Insight/Code/Numerics/vxl/vnl/vnl_vector_fixed.h", 
line 138: Error: "friend" declaration is incompatible with function 
template.
"/home/encephalon/mstyner/itk/Insight_Nightly/Insight/Code/Numerics/vxl/vnl/vnl_quaternion.h", 
line 57:     Where: While specializing "vnl_vector_fixed<double, 4>".
"/home/encephalon/mstyner/itk/Insight_Nightly/Insight/Code/Numerics/vxl/vnl/vnl_quaternion.h", 
line 57:     Where: Specialized in vnl_quaternion<double>.
"/home/encephalon/mstyner/itk/Insight_Nightly/Insight/Code/Numerics/itkQuaternionRigidTransformGradientDescentOptimizer.cxx", 
line 77:     Where: Specialized in non-template code.
2 Error(s) detected.

Is there maybe a special flag or something similar that needs to be set? 
Has anybody encountered the same problems and solved it ?

Thanks
Martin Styner