[Insight-users] Linking Error vtkITKMutualInformationTransform in vtkITK Project

alqatarneh at netscape.net alqatarneh at netscape.net
Sat Feb 19 16:01:07 EST 2005


Hi Luis, Hi all,

I got the following error while compiling the Insight Applications.
I was trying to compile and link the vtkITK Application while also creating executables for vtkITKMutualInformationTransform  and vtkITKNormalizeImageFilter.
So that they can be used for the tcl script DemoMutual.tcl.

Any help would be highly appreciated!
Regards,
Sharef

The error I got is:
 --------------------Configuration: vtkITKMutualInformationTransform - Win32 RelWithDebInfo--------------------
Linking...
MSVCRT.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
RelWithDebInfo/vtkITKMutualInformationTransform.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
------------
My CMakeLists.txt file in the Common Directory where the files exist looks like this:

SET( VTKITKCommon_SRCS
vtkITKAntiAliasBinaryImageFilter.h
vtkITKBilateralImageFilter.h
vtkITKConfidenceConnectedImageFilter.cxx
vtkITKConfidenceConnectedImageFilter.h
vtkITKConnectedThresholdImageFilter.cxx
vtkITKConnectedThresholdImageFilter.h
vtkITKCurvatureAnisotropicDiffusionImageFilter.h
vtkITKCurvatureAnisotropicDiffusionImageFilterSS.h
vtkITKDanielssonDistanceMapImageFilter.cxx
vtkITKDanielssonDistanceMapImageFilter.h
vtkITKDiscreteGaussianImageFilter.h
vtkITKGradientAnisotropicDiffusionImageFilter.h
vtkITKGradientMagnitudeImageFilter.h
vtkITKGrayscaleFillholeImageFilter.h
vtkITKImageToImageFilter.h
vtkITKImageToImageFilter2DFF.h
vtkITKImageToImageFilterFF.h
vtkITKImageToImageFilterFUL.h
vtkITKImageToImageFilterULUL.h
vtkITKImageToImageFilterUSUL.h
vtkITKImageToImageFilterUSUS.h
vtkITKIsolatedConnectedImageFilter.cxx
vtkITKIsolatedConnectedImageFilter.h
vtkITKLaplacianSegmentationLevelSetImageFilter.h
vtkITKMutualInformationTransform.cxx
vtkITKMutualInformationTransform.h
vtkITKNeighborhoodConnectedImageFilter.h
vtkITKNormalizeImageFilterSF.h
vtkITKNormalizeImageFilter.cxx
vtkITKNormalizeImageFilter.h
vtkITKOtsuThresholdImageFilter.h
vtkITKPDEDeformableRegistrationFilter.h
vtkITKSmoothingRecursiveGaussianImageFilter.h
vtkITKSmoothingRecursiveGaussianImageFilterSS.h
vtkITKThresholdSegmentationLevelSetImageFilter.h
vtkITKTobogganImageFilter.h
vtkITKWatershedImageFilter.cxx
vtkITKWatershedImageFilter.h
vtkITKWatershedImageFilterSUL.h
vtkITKStatisticsImageFilterULUL.h
vtkITKGradientMagnitudeRecursiveGaussianImageFilterSS.h
vtkITKRelabelComponentImageFilter.h
)

SET_SOURCE_FILES_PROPERTIES ( 
vtkITKImageToImageFilter.h
vtkITKImageToImageFilter2DFF.h
vtkITKImageToImageFilterFF.h
vtkITKImageToImageFilterFUL.h
vtkITKImageToImageFilterULUL.h
vtkITKImageToImageFilterUSUL.h
vtkITKImageToImageFilterUSUS.h
ABSTRACT
)

ADD_LIBRARY ( vtkVTKITKCommon ${VTKITKCommon_SRCS} )

# Configure Tcl wrappers.
VTK_WRAP_TCL2(vtkVTKITKCommonTCL VTKITKCommonTCL_SRCS ${VTKITKCommon_SRCS})
ADD_LIBRARY ( vtkVTKITKCommonTCL ${VTKITKCommonTCL_SRCS} )
TARGET_LINK_LIBRARIES(vtkVTKITKCommonTCL vtkFilteringTCL vtkCommonTCL)

# Configure Python wrappers.
IF (VTK_WRAP_PYTHON)
  VTK_WRAP_PYTHON2(vtkVTKITKCommonPython VTKITKCommonPython_SRCS
                   ${VTKITKCommon_SRCS})
  ADD_LIBRARY(vtkVTKITKCommonPython SHARED ${VTKITKCommonPython_SRCS})
  TARGET_LINK_LIBRARIES (vtkVTKITKCommonPython 
                         vtkVTKITKCommon
                         vtkFilteringPython 
                         vtkCommonPython)
ENDIF (VTK_WRAP_PYTHON)

IF(BORLAND)
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w-8004")
ENDIF(BORLAND)

TARGET_LINK_LIBRARIES(vtkVTKITKCommon vtkImaging
                      ITKIO ITKNumerics ITKBasicFilters ITKAlgorithms)

ADD_EXECUTABLE(vtkITKNormalizeImageFilter vtkITKNormalizeImageFilter.cxx)
TARGET_LINK_LIBRARIES(vtkITKNormalizeImageFilter vtkVTKITKCommon vtkImaging
                      ITKIO ITKNumerics ITKBasicFilters ITKAlgorithms)

ADD_EXECUTABLE(vtkITKMutualInformationTransform vtkITKMutualInformationTransform.cxx)
TARGET_LINK_LIBRARIES(vtkITKMutualInformationTransform vtkVTKITKCommon vtkImaging vtkCommon vtkFiltering
                      vtkIO vtkHybrid vtkRendering vtkGraphics vtkPatented vtkjpeg vtktiff ITKIO ITKNumerics ITKBasicFilters ITKAlgorithms)



__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp


More information about the Insight-users mailing list