Unresolved external symbols



  • 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?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.