Missing <qwidget.h> !

Help
2010-04-21
2013-05-09
  • Daniel DUMITRU
    Daniel DUMITRU
    2010-04-21

    Hi,
    I have played with some examples of OpenCV and now I have discovered IVT.

    I am trying to compile example found in book "Alignment and Gauging".  It's complaining that it's missing this <qwidget.h>.

    Should I install QT framework ?
    Regards,
    Daniel

     
  • Pedram Azad
    Pedram Azad
    2010-04-22

    Hi,

    it is true that for the examples of the book "Computer Vision - Principles and Practice", you'll need Qt to be installed.

    As the installation documentation of the book says, you should install version 1.1.3 of the IVT to make sure everything compiles.

    I'll upload an updated version of the source code soon, so that it doesn't require Qt anymore and compiles and runs with the current version of the IVT.

    Pedram

     
  • Daniel DUMITRU
    Daniel DUMITRU
    2010-04-22

    Pedram,
    Thank you for fast answer. I have installed the QT package and included the path on project settings.
    I still receive a lot of linker errors :
    It seems that I have missed one lib / dll in linker tab. Could you please suggest me where to look ?

    Cpp1.obj : error LNK2001: unresolved external symbol "void __cdecl PrimitivesDrawer::DrawPoint(class CByteImage *,int,int,int,int,int)" (?DrawPoint@PrimitivesDrawer@@YAXPAVCByteImage@@HHHHH@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "void __cdecl Math2d::SetVec(struct Vec2d &,float,float)" (?SetVec@Math2d@@YAXAAUVec2d@@MM@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "struct _IplImage * __cdecl IplImageAdaptor::Adapt(class CByteImage const *,bool)" (?Adapt@IplImageAdaptor@@YAPAU_IplImage@@PBVCByteImage@@_N@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "void __cdecl PrimitivesDrawerCV::PutText(class CByteImage *,char const *,double,double,double,double,int,int,int,int)" (?PutText@PrimitivesDrawerCV@@YAXPAVCByteImage@@PBDNNNNHHHH@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "void __cdecl ImageProcessor::Rotate(class CByteImage const *,class CByteImage *,float,float,float,bool)" (?Rotate@ImageProcessor@@YAXPBVCByteImage@@PAV2@MMM_N@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "void __cdecl PrimitivesDrawerCV::DrawCircle(class CByteImage *,struct Vec2d const &,double,int,int,int,int)" (?DrawCircle@PrimitivesDrawerCV@@YAXPAVCByteImage@@ABUVec2d@@NHHHH@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "void __cdecl ImageProcessor::ThresholdBinarize(class CByteImage const *,class CByteImage *,unsigned char)" (?ThresholdBinarize@ImageProcessor@@YAXPBVCByteImage@@PAV2@E@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "void __cdecl ImageProcessor::Invert(class CByteImage const *,class CByteImage *)" (?Invert@ImageProcessor@@YAXPBVCByteImage@@PAV2@@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CQTWindow::~CQTWindow(void)" (??1CQTWindow@@UAE@XZ)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CQTApplicationHandler::ProcessEventsAndGetExit(void)" (?ProcessEventsAndGetExit@CQTApplicationHandler@@UAE_NXZ)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CQTWindow::Show(void)" (?Show@CQTWindow@@UAEXXZ)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CQTWindow::DrawImage(class CByteImage const *,int,int)" (?DrawImage@CQTWindow@@UAEXPBVCByteImage@@HH@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: __thiscall CQTWindow::CQTWindow(int,int,class CWindowEventInterface *,class QWidget *)" (??0CQTWindow@@QAE@HHPAVCWindowEventInterface@@PAVQWidget@@@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "void __cdecl ImageProcessor::ConvertImage(class CByteImage const *,class CByteImage *,bool,struct MyRegion const *)" (?ConvertImage@ImageProcessor@@YAXPBVCByteImage@@PAV2@_NPBUMyRegion@@@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: __thiscall CByteImage::CByteImage(int,int,enum CByteImage::ImageType,bool)" (??0CByteImage@@QAE@HHW4ImageType@0@_N@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall CQTApplicationHandler::~CQTApplicationHandler(void)" (??1CQTApplicationHandler@@UAE@XZ)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: __thiscall CByteImage::~CByteImage(void)" (??1CByteImage@@QAE@XZ)
    Cpp1.obj : error LNK2001: unresolved external symbol "bool __cdecl ImageAccessCV::LoadFromFile(class CByteImage *,char const *)" (?LoadFromFile@ImageAccessCV@@YA_NPAVCByteImage@@PBD@Z)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: __thiscall CByteImage::CByteImage(void)" (??0CByteImage@@QAE@XZ)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CQTApplicationHandler::Reset(void)" (?Reset@CQTApplicationHandler@@UAEXXZ)
    Cpp1.obj : error LNK2001: unresolved external symbol "public: __thiscall CQTApplicationHandler::CQTApplicationHandler(int,char * *)" (??0CQTApplicationHandler@@QAE@HPAPAD@Z)
    Debug/gauge.exe : fatal error LNK1120: 21 unresolved externals
    Error executing link.exe.

    gauge.exe - 22 error(s), 0 warning(s)

     
  • Pedram Azad
    Pedram Azad
    2010-04-23

    Hi,

    these are linker errors due to missing link dependencies to ivt.lib and ivtguiqt.lib.

    But you will also have to link against qt-mt3.lib (using qtwin/free), cxcore.lib and cv.lib (using OpenCV 1.0).

    Pedram

     
  • Pedram Azad
    Pedram Azad
    2010-05-07

    Hi,

    I finally updated the source code from the book to run with the current version 1.3.8-1 (and upcoming versions) of the IVT. Qt is not required anymore (except for the application from chapter 10).

    The applications from the chapters 6 and 7 require OpenCV 1.0 - all other applications are completely stand-alone now and run without any other additional libraries. In addition to the Microsoft Visual Studio project files, I have also added Makefiles that run with Linux, Mac OS X, etc.

    Please let me know if you experience any problems.

    Pedram

     
  • Daniel DUMITRU
    Daniel DUMITRU
    2010-05-07

    Thank you !
    Now I will have a full weekend !