Fw: Re: [Insight-users] Linking Error
vtkITKMutualInformationTransform invtkITK Project
Jia Fucang
jiafucang at asisz.com
Mon Feb 21 02:55:25 EST 2005
Hi Sharef,
I think the following should be removed in the CMakelists.txt:
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)
Compiling vtkITK will produce two libraries: vtkVTKITKCommon.lib and vtkVTKITKCommonTCL.lib in the binary Common directory, and vtkITK.exe in the binary Wrapping\Tcl directory.
You may run vtkITK.exe demo Mutual.tcl to run the application, please revise the GEVTK_DATA_ROOT to the directory including the fullHead data which could be downloaded from ftp://public.kitware.com/pub/vtk/vtkTextbook/FullHead.tgz, and comment the first two lines:
#package require vtk
#package require vtkinteraction
Hope this helps.
Best,
Fucang
>>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
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk.org
>>http://www.itk.org/mailman/listinfo/insight-users
>>
More information about the Insight-users
mailing list