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 symbol while building Installer Framework

Unresolved external symbol while building Installer Framework

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 211 Views
  • 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.
  • I Offline
    I Offline
    ikarona
    wrote on 16 Mar 2025, 20:27 last edited by
    #1

    Hi!

    Currently I'm trying to build sources of IF with dynamically linked QT.
    OS: win 10
    QT - branches ifw-5.15.2, 5.15.6-lts-lgpl,... (tried different)
    IF - branch 4.3
    compiler: msvc, tried compilers from different Visual Studios: 2015, 2017, 2019

    Example for VS 2015. Same tried for other studios.

    That's how I build dynamic QT

    call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 10.0.17763.0
    SET _ROOT=D:\tfgit\qt\qt_test3\qt5
    SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
    SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
    SET _ROOT=
     
    call ..\configure -prefix %CD%\qtbase -opensource -confirm-license -platform win32-msvc2017 -release ^
     -nomake examples -nomake tests -skip qtwebengine -no-openssl -opengl desktop && -developer-build ^ 
    call nmake module-qtbase module-qtdeclarative module-qttools module-qttranslations module-qtwinextras && ^
    call nmake install
    

    This build finishes successfully all the times.

    This is how I'm trying to build IF:

    call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 10.0.17763.0
    SET QTDIR=D:\tfgit\qt\qt_test2\qt_test\qt5\qt5_build\qtbase
    SET QTDIR_LIB=%QTDIR%\lib
    SET PATH=%QTDIR%\bin;%QTDIR%\..\..\gnuwin32\bin;%QTDIR_LIB%;D:\tfgit\qt\qt_test2\installer-framework\lib;%PATH%
     
    call qmake.exe "LIBS+= -LD:\tfgit\qt\qt_test2\qt_test\qt5\qt5_build\qtbase\lib -LD:\tfgit\qt\qt_test2\qt_test\qt5\qt5_build\qtbase\bin -LD:\tfgit\qt\qt_test2\installer-framework\lib" && ^
    call nmake && ^
    call nmake install
    

    This line also tried different options. This is last try, that's why it looks like this:

    call qmake.exe "LIBS+= -LD:\tfgit\qt\qt_test2\qt_test\qt5\qt5_build\qtbase\lib -LD:\tfgit\qt\qt_test2\qt_test\qt5\qt5_build\qtbase\bin -LD:\tfgit\qt\qt_test2\installer-framework\lib" && ^
    

    Errors I'm getting are:
    Linker errors when building the installer:

    1. Unresolved RunOnceChecker symbols:
    • RunOnceChecker constructor and destructor
    • RunOnceChecker::isRunning()
    1. Missing QInstaller symbols:
    • QInstaller::init()
    • GenericFactoryQInstaller::PackageManagerPage
    • QInstaller::PackageManagerPageFactory::instance()
    1. Missing QWinTaskbarButton and QWinTaskbarProgress symbols:
    • Constructors, destructors, and methods
    1. Missing Windows API functions:
    • SHGetFolderPathW
    • Security functions (AllocateAndInitializeSid, etc.)
    • COM functions (CoInitialize, CoUninitialize)
    • Shell functions (ShellExecuteExW)
    • Privilege functions (AdjustTokenPrivileges, etc.)
    • Other Windows APIs (SysAllocString, VariantClear, etc.)

    Total: 38 unresolved external symbols

    error LNK2001: unresolved external symbol "RunOnceChecker::RunOnceChecker(const QString&)" (__imp_...)
        error LNK2001: unresolved external symbol "RunOnceChecker::~RunOnceChecker(void)" (__imp_...)
        error LNK2019/LNK2001: unresolved external symbol "bool RunOnceChecker::isRunning(QFlags<RunOnceChecker::ConditionFlag>)" (__imp_...)
      main.obj:
        error LNK2019: unresolved external symbol "RunOnceChecker::~RunOnceChecker(void)" (__imp_...) referenced in SDKApp destructor
    [QWinTaskbarButton & QWinTaskbarProgress]
      installer.lib (packagemanagergui.obj, performinstallationform.obj):
        error LNK2001/LNK2019: unresolved external symbol "QWinTaskbarButton::QWinTaskbarButton(QObject*)" (__imp_...)
        error LNK2001/LNK2019: unresolved external symbol "virtual QWinTaskbarButton::~QWinTaskbarButton(void)" (__imp_...)
        error LNK2019: unresolved external symbol "void QWinTaskbarButton::setWindow(QWindow*)" (__imp_...)
        error LNK2001/LNK2019: unresolved external symbol "QWindow* QWinTaskbarButton::window(void)const" (__imp_...)
        error LNK2001/LNK2019: unresolved external symbol "QWinTaskbarProgress* QWinTaskbarButton::progress(void)const" (__imp_...)
        error LNK2001/LNK2019: unresolved external symbol "void QWinTaskbarProgress::setValue(int)" (__imp_...)
        error LNK2019: unresolved external symbol "void QWinTaskbarProgress::reset(void)" (__imp_...)
        error LNK2019: unresolved external symbol "void QWinTaskbarProgress::setVisible(bool)" (__imp_...)
        error LNK2019: unresolved external symbol "void QWinTaskbarProgress::resume(void)" (__imp_...)
        error LNK2019: unresolved external symbol "void QWinTaskbarProgress::stop(void)" (__imp_...)
        error LNK2001: unresolved external symbol virtual ?????? QWinTaskbarButton (eventFilter, metaObject, qt_metacall, qt_metacast)
     
    [Windows API ? COM]
      installer.lib (packagemanagercoredata.obj):
        error LNK2019: unresolved external symbol "SHGetFolderPathW" (__imp_SHGetFolderPathW)
      installer.lib (adminauthorization_win.obj):
        error LNK2019: unresolved external symbols "AllocateAndInitializeSid", "CheckTokenMembership", "FreeSid", "ShellExecuteExW", "CoInitialize", "CoUninitialize" (__imp_...)
      installer.lib (utils.obj):
        error LNK2019: unresolved external symbols "OpenProcessToken", "AdjustTokenPrivileges", "PrivilegeCheck", "LookupPrivilegeValueW" (__imp_...)
      7z.lib (ArchiveExtractCallback.obj, PropVariant.obj, EnumDirItems.obj, 7zHandlerOut.obj):
        error LNK2001/LNK2019: unresolved external symbols "OpenProcessToken", "AdjustTokenPrivileges", "SysAllocString", "SysAllocStringLen", "VariantClear", "VariantCopy", "SysFreeString", "GetFileSecurityW", "SetFileSecurityW" (__imp_...)
     
      ..\..\bin\installerbase.exe : fatal error LNK1120: 38 unresolved externals
    
    1 Reply Last reply
    0
    • I Offline
      I Offline
      ikarona
      wrote on 17 Mar 2025, 17:03 last edited by ikarona
      #2

      Seems like due to this bugs discussions(specifically messages from Katja Marttila)
      https://bugreports.qt.io/browse/QTIFW-3180
      https://bugreports.qt.io/browse/QTIFW-2611

      It's required to build QT statically for installer despite the fact that it's recommendation in instruction.

      N 1 Reply Last reply 27 Mar 2025, 06:05
      0
      • I ikarona
        17 Mar 2025, 17:03

        Seems like due to this bugs discussions(specifically messages from Katja Marttila)
        https://bugreports.qt.io/browse/QTIFW-3180
        https://bugreports.qt.io/browse/QTIFW-2611

        It's required to build QT statically for installer despite the fact that it's recommendation in instruction.

        N Offline
        N Offline
        Nguyen Thang Phong
        wrote on 27 Mar 2025, 06:05 last edited by
        #3

        @ikarona Can you help me step by step build source Installer Framework ?

        I 1 Reply Last reply 7 Apr 2025, 12:52
        0
        • J JonB referenced this topic on 27 Mar 2025, 08:07
        • N Nguyen Thang Phong
          27 Mar 2025, 06:05

          @ikarona Can you help me step by step build source Installer Framework ?

          I Offline
          I Offline
          ikarona
          wrote on 7 Apr 2025, 12:52 last edited by
          #4

          @Nguyen-Thang-Phong

          make sure to call perl init-repository in QT main repo. Make sure everywhere are similar branches.

          for QT i build like this
          in D:\qt\qt_test_s\qt5\qt5-build i create script and run it for STATIC QT (to make dynamic build you need to remove flag -static from configure call.

          call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 10.0.17763.0
          SET _ROOT=D:\qt\qt_test\qt5\
          SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
          SET PATH=%_ROOT%\qtrepotools\bin;%PATH%
          SET _ROOT=
          
          call ..\configure -prefix %CD%\qtbase -static -opensource -confirm-license -platform win32-msvc2017 -release ^
           -nomake examples -nomake tests -skip qtwebengine -no-openssl -opengl desktop && -developer-build ^ 
          call nmake module-qtbase module-qtdeclarative module-qttools module-qttranslations module-qtwinextras && ^
          call nmake install
          

          After build is successful I create new script in D:\qt\qt_test_s\installer-framework to build installer framework
          Make sure installer framework is in correct branch also. You can take a look in installer-framework\INSTALL minimal required version of QT to build IF

          call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 10.0.17763.0
          SET QTDIR=D:\qt\qt_test_s\qt5\qt5-build\qtbase
          SET QTDIR_LIB=%QTDIR%\lib
          SET PATH=%QTDIR%\bin;%QTDIR%\..\..\gnuwin32\bin;%QTDIR_LIB%;D:\qt\qt_test_s\installer-framework\lib;%PATH%
          
          call qmake.exe && ^
          call nmake && ^
          call nmake install
          
          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