Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6092267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:25:22+00:00 2026-05-23T12:25:22+00:00

I have problems on building OpenCV_HighGui220d.lib with QT support. The problems are the unresolved

  • 0

I have problems on building OpenCV_HighGui220d.lib with QT support.
The problems are the unresolved symbols about QMetaObject, such as:

    public: virtual struct QMetaObject const * __thiscall GuiReceiver::metaObject(void)const (?metaObject@GuiReceiver@@UBEPBUQMetaObject@@XZ)

My Environments:
– Visual Studio 2010
– OpenCV 2.2
– QT SDK Version:4.7.3

Below are my building steps:
1. use CMake to open C:\OpenCV2.2, check on WITH_QT and WITH_QT_OPENGL, generate vcxproj and sln files.

2. add below macros in cvconfig.h:

#define HAVE_QT
#define HAVE_QT_OPENGL

3. add window_QT.cpp into opencv_highgui.vcxproj file in VS2010, and add below macros in window_QT.cpp

#define QT_LARGEFILE_SUPPORT
#define QT_DLL
#define QT_GUI_LIB
#define QT_CORE_LIB
#define QT_HAVE_MMX
#define QT_HAVE_3DNOW
#define QT_HAVE_SSE
#define QT_HAVE_MMXEXT
#define QT_HAVE_SSE2
#define QT_THREAD_SUPPORT

I also tried to replace QT_DLL with QT_NODLL, but did not succeed.

4. Add directory C:/QtSDK/Desktop/Qt/4.7.3/msvc2008/lib in Additional Library Directories in Linker Property pages.

5. Add below libraries in Additional Dependencies:

qtmain.lib
qtmaind.lib
QtGui4.lib
QtGuid4.lib
QtCore4.lib
QtCored4.lib
QtOpenGL4.lib
QtOpenGLd4.lib
Qt3Support4.lib
Qt3Supportd4.lib
QtHelp4.lib
QtHelpd4.lib
QtDesigner4.lib
QtDesignerd4.lib
QAxContainer.lib
QAxContainerd.lib
phonon4.lib
phonond4.lib
QAxServer.lib
QAxServerd.lib
QtDeclarative4.lib
QtDeclaratived4.lib
QtDesignerComponents4.lib
QtDesignerComponentsd4.lib
QtMultimedia4.lib
QtMultimediad4.lib
QtNetwork4.lib
QtNetworkd4.lib
QtScript4.lib
QtScriptd4.lib
QtScriptTools4.lib
QtScriptToolsd4.lib
QtSql4.lib
QtSqld4.lib
QtSvg4.lib
QtSvgd4.lib
QtTest4.lib
QtTestd4.lib
QtUiTools.lib
QtUiToolsd.lib
QtWebKit4.lib
QtWebKitd4.lib
QtXml4.lib
QtXmld4.lib
QtXmlPatterns4.lib
QtXmlPatternsd4.lib

6. Finally, the linker reports error:

------ Build started: Project: ZERO_CHECK, Configuration: Debug Win32 ------
------ Build started: Project: opencv_highgui, Configuration: Debug Win32 ------
     Creating library C:/OpenCV2.2/Build_QT/lib/Debug/opencv_highgui220d.lib and object C:/OpenCV2.2/Build_QT/lib/Debug/opencv_highgui220d.exp
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall GuiReceiver::metaObject(void)const " (?metaObject@GuiReceiver@@UBEPBUQMetaObject@@XZ)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall GuiReceiver::qt_metacast(char const *)" (?qt_metacast@GuiReceiver@@UAEPAXPBD@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall GuiReceiver::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@GuiReceiver@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvTrackbar::metaObject(void)const " (?metaObject@CvTrackbar@@UBEPBUQMetaObject@@XZ)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvTrackbar::qt_metacast(char const *)" (?qt_metacast@CvTrackbar@@UAEPAXPBD@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CvTrackbar::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvTrackbar@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const CvTrackbar::staticMetaObject" (?staticMetaObject@CvTrackbar@@2UQMetaObject@@B)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvButtonbar::metaObject(void)const " (?metaObject@CvButtonbar@@UBEPBUQMetaObject@@XZ)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvButtonbar::qt_metacast(char const *)" (?qt_metacast@CvButtonbar@@UAEPAXPBD@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CvButtonbar::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvButtonbar@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const CvButtonbar::staticMetaObject" (?staticMetaObject@CvButtonbar@@2UQMetaObject@@B)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvPushButton::metaObject(void)const " (?metaObject@CvPushButton@@UBEPBUQMetaObject@@XZ)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvPushButton::qt_metacast(char const *)" (?qt_metacast@CvPushButton@@UAEPAXPBD@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CvPushButton::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvPushButton@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvCheckBox::metaObject(void)const " (?metaObject@CvCheckBox@@UBEPBUQMetaObject@@XZ)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvCheckBox::qt_metacast(char const *)" (?qt_metacast@CvCheckBox@@UAEPAXPBD@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CvCheckBox::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvCheckBox@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvRadioButton::metaObject(void)const " (?metaObject@CvRadioButton@@UBEPBUQMetaObject@@XZ)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvRadioButton::qt_metacast(char const *)" (?qt_metacast@CvRadioButton@@UAEPAXPBD@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CvRadioButton::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvRadioButton@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvWinProperties::metaObject(void)const " (?metaObject@CvWinProperties@@UBEPBUQMetaObject@@XZ)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvWinProperties::qt_metacast(char const *)" (?qt_metacast@CvWinProperties@@UAEPAXPBD@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CvWinProperties::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvWinProperties@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall CvWindow::metaObject(void)const " (?metaObject@CvWindow@@UBEPBUQMetaObject@@XZ)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall CvWindow::qt_metacast(char const *)" (?qt_metacast@CvWindow@@UAEPAXPBD@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall CvWindow::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@CvWindow@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const CvWindow::staticMetaObject" (?staticMetaObject@CvWindow@@2UQMetaObject@@B)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall ViewPort::metaObject(void)const " (?metaObject@ViewPort@@UBEPBUQMetaObject@@XZ)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall ViewPort::qt_metacast(char const *)" (?qt_metacast@ViewPort@@UAEPAXPBD@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall ViewPort::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@ViewPort@@UAEHW4Call@QMetaObject@@HPAPAX@Z)
window_QT.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const ViewPort::staticMetaObject" (?staticMetaObject@ViewPort@@2UQMetaObject@@B)
C:\OpenCV2.2\Build_QT\bin\Debug\opencv_highgui220d.dll : fatal error LNK1120: 31 unresolved externals
========== Build: 1 succeeded, 1 failed, 8 up-to-date, 0 skipped ==========

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:25:23+00:00Added an answer on May 23, 2026 at 12:25 pm

    The Qt MOC (meta-object compiler) is not being run on your Qt class files.

    Since you’re building from the OpenCV release, I’m assuming that the UI classes already have a Q_OBJECT line within the class declaration.

    To generate a .vcproj file that has the necessary build instructions to run MOC, run this command:

    qmake -tp vc -r <yourProFile.pro>
    

    If that doesn’t work, right-click one of the .h files that contains a Qt class. Under Properties->Custom Build Step->General, you should see something like:

    Command Line "$(QTDIR)\bin\moc.exe" -I".\GeneratedFiles\." -I"$(QTDIR)\include\." -I".\GeneratedFiles\$(ConfigurationName)\." -I"$(QTDIR)\include\QtCore\." -I"$(QTDIR)\include\QtGui\." .\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp" "-fstdafx.h" "-f[YourQtFile.h]"
    Description Moc'ing $(InputFileName)...
    Outputs ".\GeneratedFiles\$(ConfigurationName)\moc_$(InputName).cpp"
    Additional Dependencies "$(QTDIR)\bin\moc.exe";$(InputPath)
    

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problems building a binary tree from the bottom up. THe input of
I'm building a little MVC system (learning) and I have some problems with showing
I have been building a module and making numerous changes without any problems until
I have some problems with building connection strings. I used to generate Provider=SQLOLEDB or
I have an old C++ project and I'm having problem building it. For a
I am building my first ASP.Net MVC based app and have a problem accessing
I'm building a micro site at the moment and I have a problem. I
I have searched/Googled around but I'm struggling with the following problem. I am building
I have problems with bringing a windows mobile 6 form to the front. I
I have problems binding both a telerik RadGrid and a plain vanilla ASP.NET GridView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.