[Insight-users] tons of undefined reference when compile custom
pojects
Changhua Wu
wuchanghua at yahoo.com
Tue Feb 22 14:05:40 EST 2005
I installed ITK 2.0 by simply the following steps on
fedora linux with no problem:
cmake .
make
make install
It does not requre me to set ITK_BINARY_DIR. However,
when I tried to compile a custom project, I got tons
of undefined reference error. I tried to set
ITK_BINARY_DIR to the directory of binary files and I
can see the ITKConfig.make in that directory. I check
the information in ITKConfig.make and did not find any
errors. I attached the CMakeLists.txt for reference.
Below is part of the errors i got:
Building executable
/home/wch/Itk-2.0/InsightToolkit-2.0.0/Examples/Registration/deform_registration2/deform_registration2...
DeformableRegistration2.o(.text+0x1524): In function
`__static_initialization_and_destruction_0(int, int)':
: undefined reference to
`itksys::SystemToolsManager::SystemToolsManager[in-charge]()'
DeformableRegistration2.o(.text+0x156b): In function
`__tcf_1':
: undefined reference to
`itksys::SystemToolsManager::~SystemToolsManager
[in-charge]()'
DeformableRegistration2.o(.gnu.linkonce.r._ZTVN3itk15ImageFileWriterINS_5ImageINS_6VectorIfLj3EEELj3EEEEE+0x48):
undefined reference to
`itk::ProcessObject::GetNumberOfValidRequiredInputs()
const'
DeformableRegistration2.o(.gnu.linkonce.r._ZTVN3itk15ImageFileWriterINS_5ImageINS_6VectorIfLj3EEELj3EEEEE+0x88):
undefined reference to
`itk::ProcessObject::GetReleaseDataFlag() const'
DeformableRegistration2.o(.gnu.linkonce.r._ZTVN3itk15ImageFileWriterINS_5ImageINS_6VectorIfLj3EEELj3EEEEE+0xe8):
undefined reference to
`itk::ProcessObject::CacheInputReleaseDataFlags()'
DeformableRegistration2.o(.gnu.linkonce.r._ZTVN3itk15ImageFileWriterINS_5ImageINS_6VectorIfLj3EEELj3EEEEE+0xec):
undefined reference to
`itk::ProcessObject::RestoreInputReleaseDataFlags()'
Anyone can tell me what is wrong? Thanks.
__________________________________
Do you Yahoo!?
Meet the all-new My Yahoo! - Try it today!
http://my.yahoo.com
-------------- next part --------------
PROJECT(deform_registration2)
FIND_PACKAGE(ITK)
IF(ITK_FOUND)
INCLUDE(${ITK_USE_FILE})
ELSE(ITK_FOUND)
MESSAGE(FATAL_ERROR
"ITK not found. Please set ITK_DIR.")
ENDIF(ITK_FOUND)
ADD_EXECUTABLE(deform_registration2 DeformableRegistration2.cxx )
TARGET_LINK_LIBRARIES(deform_registration2 ITKAlgorithms ITKFEM ITKNumerics ITKStatistics ITKIO ITKBasicFilters ITKCommon)
More information about the Insight-users
mailing list