Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Unresolved external symbols
Qt 6.11 is out! See what's new in the release blog

Unresolved external symbols

Scheduled Pinned Locked Moved Installation and Deployment
1 Posts 1 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    marlloz
    wrote on last edited by
    #1

    Hi all,

    I have been working in a Qt application, I have been compiling statically but after some many changes I started to get these errors:

    @link /LIBPATH:"c:\Qt\Qt4.8.5_static_msvc2010-2\lib" /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='' processorArchitecture=''" /VERSION:1.40 /OUT:release\serialchecks.exe @C:\Users\100132~1.WS-\AppData\Local\Temp\serialchecks.exe.11256.10483.jom
    Creating library release\serialchecks.lib and object release\serialchecks.exp
    moc_msgbox.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QS60Style::staticMetaObject" (?staticMetaObject@QS60Style@@2UQMetaObject@@B)
    main.obj : error LNK2019: unresolved external symbol "public: static struct QMetaObject const QS60Style::staticMetaObject" (?staticMetaObject@QS60Style@@2UQMetaObject@@B) referenced in function "public: static class QString __cdecl QS60Style::tr(char const *,char const *)" (?tr@QS60Style@@SA?AVQString@@PBD0@Z)
    labelcheck.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QS60Style::staticMetaObject" (?staticMetaObject@QS60Style@@2UQMetaObject@@B)
    msgbox.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QS60Style::staticMetaObject" (?staticMetaObject@QS60Style@@2UQMetaObject@@B)
    moc_labelcheck.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QS60Style::staticMetaObject" (?staticMetaObject@QS60Style@@2UQMetaObject@@B)
    moc_msgbox.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWSEmbedWidget::staticMetaObject" (?staticMetaObject@QWSEmbedWidget@@2UQMetaObject@@B)
    main.obj : error LNK2019: unresolved external symbol "public: static struct QMetaObject const QWSEmbedWidget::staticMetaObject" (?staticMetaObject@QWSEmbedWidget@@2UQMetaObject@@B) referenced in function "public: static class QString __cdecl QWSEmbedWidget::tr(char const *,char const *)" (?tr@QWSEmbedWidget@@SA?AVQString@@PBD0@Z)
    labelcheck.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWSEmbedWidget::staticMetaObject" (?staticMetaObject@QWSEmbedWidget@@2UQMetaObject@@B)
    msgbox.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWSEmbedWidget::staticMetaObject" (?staticMetaObject@QWSEmbedWidget@@2UQMetaObject@@B)
    moc_labelcheck.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QWSEmbedWidget::staticMetaObject" (?staticMetaObject@QWSEmbedWidget@@2UQMetaObject@@B)
    release\serialchecks.exe : fatal error LNK1120: 2 unresolved externals
    Release\Makefile [release] Error 2
    10:06:00: The process "C:\Qt\qtcreator-2.8.0\bin\jom.exe" exited with code 2.
    Error while building/deploying project labelcheck (kit: Qt4.8.5 static MSVC2010)
    When executing step 'Make'
    10:06:00: Elapsed time: 00:12.@

    I can see they refer somwhow to tr() method, so I suppressed them but results are the same

    Also, I always get lots of this warnin:
    @C4910: 'QVector<T>' : '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation @

    I have already deleted the build directory, cleaned and rebuilt many times
    And when compiling with shared libraries of same version it does without issues.

    I am trying to go back over the modifications since the compiling version, but meanwhile, do you have any clue on what else should I check?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved