[Insight-users] problems when I trying to integrate ITK with VTK + MFC

#ZHAO ZHEEN# kurtzhao at pmail . ntu . edu . sg
Fri, 19 Dec 2003 10:46:01 +0800


Hi,

I am an entry level user.=20
In my application, I need to use ITK VTK and MFC. The VTK and ITK are =
built on my PC. The sample programs which implement VTK+MFC and ITK+MFC =
work very well.=20
However, when I try to add ITK to the sample application: =
\VTK4.2\Examples\GUI\Win32\vtkMFC\vtkSDI, I got trouble. The sample =
alone works well. When I add=20
"FIND_PACKAGE(ITK)
IF(ITK_FOUND)
   INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
   MESSAGE(FATAL_ERROR
           "Cannot build without ITK.  Please set ITK_DIR.")
ENDIF(ITK_FOUND)"=20
to its CMakeLists.txt, there is no problem in building and running. =
However, as long as I added "${ITK_LIBRARIES}" or other itk-lib to =
LINK_LIBRARIES, the compiler reported error that =
"E:\work\try\ivtkmfc\vtkSDIView.cpp(147) : error C2065: 'min' : =
undeclared identifier". This is the line "float scale =3D min(fx,fy); ".

The OS is  win2000; compiler: VC++6.0; CMake: 1.82; ITK: 1.4; VTK: 4.2;

Would anybody help me?

Best Regards
Kurt