Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Build GUI project using Visual Studio 2017 , Qt:5.11.2 static link



  • Hello every one.
    I'm using vs2017 + qt visual stuido tools and Qt version: 5.11.2

    I have compiled Qt static libs.

    In my GUI project, I added libs:
    qtmaind.lib
    Qt5Cored.lib
    Qt5Guid.lib
    Qt5Widgetsd.lib
    Qt5WinExtras.lib
    qtfreetyped.lib
    qtpcre2.lib
    qtharfbuzzd.lib
    qtlibpngd.lib
    Netapi32.lib
    Mincore.lib
    Imm32.lib
    Dwmapi.lib
    Qt5EventDispatcherSupportd.lib
    Qt5FontDatabaseSupportd.lib
    Qt5WindowsUIAutomationSupportd.lib
    Qt5PlatformCompositorSupportd.lib
    qwindowsd.lib

    and mian.cpp
    #include <QtPlugin>

    Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);

    finally, i got these error:
    1>qwindowsd.lib(qwindowstheme.obj) : error LNK2001: unresolved external symbol "public: virtual class QPixmap __cdecl QAbstractFileIconEngine::pixmap(class QSize const &,enum QIcon::Mode,enum QIcon::State)" (?pixmap@QAbstractFileIconEngine@@UEAA?AVQPixmap@@AEBVQSize@@W4Mode@QIcon@@W4State@5@@Z)
    1>qwindowsd.lib(qwindowstheme.obj) : error LNK2001: unresolved external symbol "public: virtual class QSize __cdecl QAbstractFileIconEngine::actualSize(class QSize const &,enum QIcon::Mode,enum QIcon::State)" (?actualSize@QAbstractFileIconEngine@@UEAA?AVQSize@@AEBV2@W4Mode@QIcon@@W4State@4@@Z)
    1>qwindowsd.lib(qwindowstheme.obj) : error LNK2001: unresolved external symbol "protected: virtual class QString __cdecl QAbstractFileIconEngine::cacheKey(void)const " (?cacheKey@QAbstractFileIconEngine@@MEBA?AVQString@@XZ)

    Was I miss something ?

    thx a lot.



  • You need add "Qt5ThemeSupportd.lib" to your linker addtional dependencies


Log in to reply