[Insight-users] Re: [vtkusers] Porting Problem - Please Help!

gcope at engin.umich.edu gcope at engin.umich.edu
Thu, 25 Mar 2004 23:19:11 -0500


Brad,

Thanks a lot for your help. The exact error is as follows:

itkSparseFieldLevelSetImageFilter.txx(479) : error C2668: 'vcl_sqrt' : ambiguous
call to overloaded function
        C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xmemory(61) :
while compiling class-template member function 'void __thiscall
itk::SparseFieldLevelSetImageFilter<class itk::Image<unsigned short,3>,class
itk::Image<unsigned short,3> >::
UpdateActiveLayerValues(double,class itk::SparseFieldLayer<class
itk::SparseFieldLevelSetNode<class itk::Index<3> > > *,class
itk::SparseFieldLayer<class itk::SparseFieldLevelSetNode<class itk::Index<3> >
> *)'

Itk and Vtk both compiled fine. My program includes both Itk and Vtk functions,
and the Vtk functions compile correctly on their own.

Let me know if any other info would be helpful.

Thanks again,
Jamie

Quoting Brad King <brad.king at kitware.com>:

> gcope at engin.umich.edu wrote:
> 
> > Hi all-
> > 
> > I recently had to switch work machines and am having major problems
> > getting my previously fine itk/vtk applications to compile. I hope someone
> > can save me from adding to the several hours I've already spent on the
> > problem.
> > 
> > The compile error I am getting says that there are ambiguous calls the
> > overloaded function "vcl_sqrt" in an Itk segmentation algorithm. With all
> > Itk functions commented out, the Vtk functions compile and run fine.
> > 
> > Here are my configurations:
> > 
> > Old PC
> > -------------
> > Windows XP
> > Vtk 4.2.2
> > Itk 1.2.0
> > Cmake 1.6.7
> > 
> > New PC
> > -------------
> > Windows 2000
> > Vtk 4.2.2
> > Itk 1.6.0
> > Cmake 1.8.3
> > 
> > 
> > The only thing that I can think of that would cause the inconsistency
> > between the two machines is if I somehow compiled Itk incorrectly on the
> > new PC. Everything seemed to be fine. The only odd thing that I noticed is
> > that there was not flag for "USE_VTK" in the Cmake options when creating
> > the build files for Itk. Vtk seemed to compile fine (with USE_ANSI_STDLIB
> > on). Does anyone have any ideas?
> 
> I strongly suspect this is an ITK problem, so I'd prefer to move 
> discussion to the ITK users list.
> 
> The "USE_VTK" option was removed in ITK 1.4 because the VTK-dependent 
> applications were moved into a separate "InsightApplications" tree 
> outside of the main ITK tree.
> 
> In order to help you I'll need a bit more information.  Did ITK compile 
> successfully and it is your application that includes both ITK and VTK 
> that fails to build?  Also, please post the exact error messages your 
> compiler produces.
> 
> Thanks,
> -Brad
> 
>