[Insight-users] Question about QtITKExample

Julien Jomier jjomier at cs . unc . edu
Thu, 14 Aug 2003 10:51:06 -0400


Hi Chunyan,

You don't have to modify the CMakeLists.txt
In CMake, just click on the "Show Advanced Values" checkbox and specify the
QT_QT_LIBRARY as
qt-mt230nc.lib.
If you installed Qt by default the library should be located in
C:/qt/lib/qt-mt230nc.lib 

Julien

> -----Original Message-----
> From: insight-users-admin at itk . org 
> [mailto:insight-users-admin at itk . org] On Behalf Of jiang
> Sent: Thursday, August 14, 2003 10:32 AM
> To: ITK
> Subject: [Insight-users] Question about QtITKExample
> 
> 
> 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
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org 
> http://www . itk . org/mailman/listinfo/insight-> users
>