[Insight-users] Question about QtITKExample

jiang jiang at TI . Uni-Trier . DE
Thu, 14 Aug 2003 16:31:56 +0200


Hi,
I'm newer to Qt and ITK. I try to compile the example QtITK. However I meet
many problem. I use ITK1.2.0,Qt non commercial 230, VC++6 on Microsoft2000.
Firstly I copy the source code from ITK\InsightApplications-1.2.0\QtITK to
my directory. I run CMake, set source code and binary path, configure it.
One error message appears: CMake Error: This project requires some variables
to be set, and cmake can not find them. Please set the following
variables:QT_QT_LIBRARY(ADVANCED). So I change the CMakeLists file from
LINK_LIBRARIES (
ITKIO
${QT_QT_LIBRARY}
)
to
LINK_LIBRARIES (
ITKIO
${QT_QT_LIBRARY(ADVANCED)}
)
Then I configure the CMake again. This time it passed. I build this project
in MSVC6. There are many errors. Such as:
Linking...
   Creating library Debug/QtITK.lib and object Debug/QtITK.exp
itkQtProgressBar.obj : error LNK2001: unresolved external symbol "protected:
virtual int __thiscall QPaintDevice::fontInf(class QFont *,int)const "
(?fontInf at QPaintDevice@@MBEHPAVQFont@@H at Z)
qtITK.obj : error LNK2001: unresolved external symbol "protected: virtual
int __thiscall QPaintDevice::fontInf(class QFont *,int)const "
(?fontInf at QPaintDevice@@MBEHPAVQFont@@H at Z)
itkQtProgressBar.obj : error LNK2001: unresolved external symbol "protected:
virtual int __thiscall QPaintDevice::fontMet(class QFont *,int,char const
*,int)const " (?fontMet at QPaintDevice@@MBEHPAVQFont@@HPBDH at Z)
qtITK.obj : error LNK2001: unresolved external symbol "protected: virtual
int __thiscall QPaintDevice::fontMet(class QFont *,int,char const
*,int)const " (?fontMet at QPaintDevice@@MBEHPAVQFont@@HPBDH at Z)
itkQtProgressBar.obj : error LNK2001: unresolved external symbol "protected:
virtual int __thiscall QWidget::metric(int)const "
(?metric at QWidget@@MBEHH at Z)
qtITK.obj : error LNK2001: unresolved external symbol "protected: virtual
int __thiscall QWidget::metric(int)const " (?metric at QWidget@@MBEHH at Z)
itkQtProgressBar.obj : error LNK2001: unresolved external symbol "protected:
virtual bool __thiscall QPaintDevice::cmd(int,class QPainter *,union
QPDevCmdParam *)"
(?cmd at QPaintDevice@@MAE_NHPAVQPainter@@PATQPDevCmdParam@@@Z)
qtITK.obj : error LNK2001: unresolved external symbol "protected: virtual
bool __thiscall QPaintDevice::cmd(int,class QPainter *,union QPDevCmdParam
*)" (?cmd at QPaintDevice@@MAE_NHPAVQPainter@@PATQPDevCmdParam@@@Z)
itkQtProgressBar.obj : error LNK2001: unresolved external symbol "protected:
virtual bool __thiscall QProgressBar::setIndicator(class QString &,int,int)"
(?setIndicator at QProgressBar@@MAE_NAAVQString@@HH at Z)
itkQtProgressBar.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall QProgressBar::setProgress(int)"
(?setProgress at QProgressBar@@UAEXH at Z)
itkQtProgressBar.obj : error LNK2001: unresolved external symbol "public:
virtual void __thiscall QProgressBar::setTotalSteps(int)"
(?setTotalSteps at QProgressBar@@UAEXH at Z)
itkQtProgressBar.obj : error LNK2001: unresolved external symbol "protected:
virtual void __thiscall QProgressBar::drawContentsMask(class QPainter *)"
(?drawContentsMask at QProgressBar@@MAEXPAVQPainter@@@Z)
itkQtProgressBar.obj : error LNK2001: unresolved external symbol "protected:
virtual void __thiscall QFrame::drawFrameMask(class QPainter *)"
(?drawFrameMask at QFrame@@MAEXPAVQPainter@@@Z)
....
ebug/QtITK.exe : fatal error LNK1120: 187 unresolved externals
Error executing link.exe.

ALL_BUILD - 283 error(s), 0 warning(s)

I find that they all relate to Qt. How can I solve them?

Thank you very much!


Chunyan