[Insight-users] Cmake Linking Object Error: undefined reference
Abayiz
abayiz at yahoo.com
Sun Nov 20 12:37:14 EST 2011
Isn't there someone can answer my question here??
________________________________
From: Abayiz <abayiz at yahoo.com>
To: "insight-users at itk.org" <insight-users at itk.org>
Sent: Friday, November 18, 2011 1:44 PM
Subject: [Insight-users] Cmake Linking Object Error: undefined reference
Hi all,
I am using ccmake to compile my itk code. But the compilation problem occurs while building a specific target for object file. Here is the error message from the screen:
*******************Scanning dependencies of target VavSegment
[100%] Building CXX object CMakeFiles/VavSegment.dir/VavSegment.o
Linking CXX executable VavSegment
CMakeFiles/VavSegment.dir/VavSegment.o:(.rodata._ZTVN3itk38VavBoneSegmentationLevelSetImageFilterINS_5ImageIfLj3EEES2_fEE[vtable for itk::VavBoneSegmentationLevelSetImageFilter<itk::Image<float, 3u>, itk::Image<float, 3u>, float>]+0x458): undefined reference to `itk::VavBoneSegmentationLevelSetImageFilter<itk::Image<float, 3u>, itk::Image<float, 3u>,
float>::SetThirdAdvectionFunction(itk::Image<itk::FixedArray<float, 3u>, 3u>*)'
collect2: ld returned 1 exit status
make[2]: *** [VavSegment] Error 1
make[1]: *** [CMakeFiles/VavSegment.dir/all] Error 2
make: *** [all] Error 2
********************
My CMakeLists is as follows:
****************
cmake_minimum_required(VERSION 2.4)
PROJECT( VavSegment )
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ENDIF(ITK_FOUND)
SET(CMAKE_BUILD_TYPE "Release")
ADD_EXECUTABLE( VavSegment VavSegment.cxx
VavBoneSegmentationLevelSetFunction.h
VavBoneSegmentationLevelSetFunction.txx
VavBoneSegmentationLevelSetImageFilter.h
VavBoneSegmentationLevelSetImageFilter.txx
)
TARGET_LINK_LIBRARIES( VavSegment
ITKIO ITKCommon ITKBasicFilters ITKStatistics ITKAlgorithms
)
***************************
What could be the problem? Many thanks in advance!
Regards,
Abayiz
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.html
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20111120/0405a6b9/attachment.htm>
More information about the Insight-users
mailing list