[Insight-users] problem with Qt example and itk

platon galatis pgalatis at hotmail.com
Tue Jul 18 12:00:18 EDT 2006


Hello all,

Im trying to build the QtItk example from Insight Applications 2.6.

I use CMake 2.4 , ITK 2.6, Qt 3.2.1 non-commercia and Visual Studio 7.

This is the CMakeLists.txt file:l

PROJECT(QtITKExample)

  FIND_PACKAGE(ITK)
  IF(ITK_FOUND)
    INCLUDE(${ITK_USE_FILE})
  ELSE(ITK_FOUND)
    MESSAGE(FATAL_ERROR
            "Cannot build InsightApplications without ITK.  Please set 
ITK_DIR.")
  ENDIF(ITK_FOUND)

#
# Find QT
#
INCLUDE (${CMAKE_ROOT}/Modules/FindQt.cmake)

INCLUDE_DIRECTORIES(
${QT_INCLUDE_DIR}
${QT_INCLUDE_PATH}

)

LINK_LIBRARIES (
ITKIO
${QT_QT_LIBRARY}
)

IF(WIN32)
ADD_DEFINITIONS(-DQT_DLL)
ENDIF(WIN32)

SET(QtITK_SRCS
itkQtProgressBar.cxx
qtITK.cxx
)

I get these erros while building:

------ Build started: Project: QtITK, Configuration: Debug Win32 ------

Linking...
   Creating library Debug\QtITK.lib and object Debug\QtITK.exp
qtITK.obj : error LNK2001: unresolved external symbol "public: virtual bool 
__thiscall itk::QtTranslator::qt_property(int,int,class QVariant *)" 
(?qt_property at QtTranslator@itk@@UAE_NHHPAVQVariant@@@Z)
qtITK.obj : error LNK2001: unresolved external symbol "public: virtual bool 
__thiscall itk::QtTranslator::qt_emit(int,struct QUObject *)" 
(?qt_emit at QtTranslator@itk@@UAE_NHPAUQUObject@@@Z)
qtITK.obj : error LNK2001: unresolved external symbol "public: virtual bool 
__thiscall itk::QtTranslator::qt_invoke(int,struct QUObject *)" 
(?qt_invoke at QtTranslator@itk@@UAE_NHPAUQUObject@@@Z)
qtITK.obj : error LNK2001: unresolved external symbol "public: virtual void 
* __thiscall itk::QtTranslator::qt_cast(char const *)" 
(?qt_cast at QtTranslator@itk@@UAEPAXPBD at Z)
qtITK.obj : error LNK2001: unresolved external symbol "public: virtual char 
const * __thiscall itk::QtTranslator::className(void)const " 
(?className at QtTranslator@itk@@UBEPBDXZ)
qtITK.obj : error LNK2019: unresolved external symbol "public: static class 
QMetaObject * __cdecl itk::QtTranslator::staticMetaObject(void)" 
(?staticMetaObject at QtTranslator@itk@@SAPAVQMetaObject@@XZ) referenced in 
function "public: virtual class QMetaObject * __thiscall 
itk::QtTranslator::metaObject(void)const " 
(?metaObject at QtTranslator@itk@@UBEPAVQMetaObject@@XZ)
qtITK.obj : error LNK2019: unresolved external symbol "protected: void 
__thiscall itk::QtTranslator::Signal(void)" 
(?Signal at QtTranslator@itk@@IAEXXZ) referenced in function "public: void 
__thiscall itk::QtSignalAdaptor::EmitSignal(void)" 
(?EmitSignal at QtSignalAdaptor@itk@@QAEXXZ)
qtITK.obj : error LNK2001: unresolved external symbol "public: virtual bool 
__thiscall itk::QtLightIndicator::qt_property(int,int,class QVariant *)" 
(?qt_property at QtLightIndicator@itk@@UAE_NHHPAVQVariant@@@Z)
qtITK.obj : error LNK2001: unresolved external symbol "public: virtual bool 
__thiscall itk::QtLightIndicator::qt_emit(int,struct QUObject *)" 
(?qt_emit at QtLightIndicator@itk@@UAE_NHPAUQUObject@@@Z)
qtITK.obj : error LNK2001: unresolved external symbol "public: virtual bool 
__thiscall itk::QtLightIndicator::qt_invoke(int,struct QUObject *)" 
(?qt_invoke at QtLightIndicator@itk@@UAE_NHPAUQUObject@@@Z)
qtITK.obj : error LNK2001: unresolved external symbol "public: virtual void 
* __thiscall itk::QtLightIndicator::qt_cast(char const *)" 
(?qt_cast at QtLightIndicator@itk@@UAEPAXPBD at Z)
qtITK.obj : error LNK2001: unresolved external symbol "public: virtual char 
const * __thiscall itk::QtLightIndicator::className(void)const " 
(?className at QtLightIndicator@itk@@UBEPBDXZ)
qtITK.obj : error LNK2019: unresolved external symbol "public: static class 
QMetaObject * __cdecl itk::QtLightIndicator::staticMetaObject(void)" 
(?staticMetaObject at QtLightIndicator@itk@@SAPAVQMetaObject@@XZ) referenced in 
function "public: virtual class QMetaObject * __thiscall 
itk::QtLightIndicator::metaObject(void)const " 
(?metaObject at QtLightIndicator@itk@@UBEPAVQMetaObject@@XZ)
Debug\QtITK.exe : fatal error LNK1120: 13 unresolved externals

Build log was saved at "file://d:\sds\QtITK.dir\Debug\BuildLog.htm"
QtITK - 14 error(s), 0 warning(s)


------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 ------

Project configuration skipped because it is not selected in this solution 
configuration


------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------

Project configuration skipped because it is not selected in this solution 
configuration


---------------------- Done ----------------------

    Build: 0 succeeded, 1 failed, 2 skipped




Does anyone know whats wrong or any way to resolve this?

Regards ,

Plato.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the Insight-users mailing list