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. error linking using static qt and msvc
Qt 6.11 is out! See what's new in the release blog

error linking using static qt and msvc

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 2.1k 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.
  • mastupristiM Offline
    mastupristiM Offline
    mastupristi
    wrote on last edited by
    #1

    Hallo,
    I have a problem when linking an executable. It seems that the list of file .lib to be linkend is treated as unknown parameters:

    link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:release\prova.exe @C:\Users\max\AppData\Local\Temp\prova.exe.1508.344.jom
    LINK : warning LNK4044: unrecognized option '/Qt/Qt5-static/lib\Qt5PlatformSupport.lib'; ignored
    LINK : warning LNK4044: unrecognized option '/Qt/Qt5-static/lib\qtfreetype.lib'; ignored
    LINK : warning LNK4044: unrecognized option '/Qt/Qt5-static/lib\Qt5Gui.lib'; ignored
    [...]
    Qt5Gui.lib(qtextengine.obj) : error LNK2019: unresolved external symbol _hb_buffer_create referenced in function "private: int __thiscall QTextEngine::shapeTextWithHarfbuzzNG(struct QScriptItem const &,unsigned short const *,int,class QFontEngine *,class QVector<unsigned int> const &,bool)const " (?shapeTextWithHarfbuzzNG@QTextEngine@@ABEHABUQScriptItem@@PBGHPAVQFontEngine@@ABV?$QVector@I@@_N@Z)
    Qt5Gui.lib(qtextengine.obj) : error LNK2019: unresolved external symbol _hb_buffer_destroy referenced in function "private: int __thiscall QTextEngine::shapeTextWithHarfbuzzNG(struct QScriptItem const &,unsigned short const *,int,class QFontEngine *,class QVector<unsigned int> const &,bool)const " (?shapeTextWithHarfbuzzNG@QTextEngine@@ABEHABUQScriptItem@@PBGHPAVQFontEngine@@ABV?$QVector@I@@_N@Z)
    [...]
    

    I have surely misunderstood some step.
    In a newly installed Windows 7 machen I have install Visual Studio 15 Community edition, perl, python and msysgit.
    Then I have cloned qt5, and checkout v5.5.1 (also for submodules).
    I opened a cmd windows and setup the environment with:

    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
    

    and then I have configured using:

    configure  -developer-build -opensource -nomake examples -nomake tests -mp -static -prefix "c:\Qt\Qt5-static" 
    

    finally nmake and nmake install, so in c:\Qt\Qt5-static I can find a tree with the static qt library.

    but when I try to build a simple project it fails the linker step.

    I cannot figure out why

    best regards
    Max

    jsulmJ 1 Reply Last reply
    0
    • mastupristiM mastupristi

      Hallo,
      I have a problem when linking an executable. It seems that the list of file .lib to be linkend is treated as unknown parameters:

      link /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:release\prova.exe @C:\Users\max\AppData\Local\Temp\prova.exe.1508.344.jom
      LINK : warning LNK4044: unrecognized option '/Qt/Qt5-static/lib\Qt5PlatformSupport.lib'; ignored
      LINK : warning LNK4044: unrecognized option '/Qt/Qt5-static/lib\qtfreetype.lib'; ignored
      LINK : warning LNK4044: unrecognized option '/Qt/Qt5-static/lib\Qt5Gui.lib'; ignored
      [...]
      Qt5Gui.lib(qtextengine.obj) : error LNK2019: unresolved external symbol _hb_buffer_create referenced in function "private: int __thiscall QTextEngine::shapeTextWithHarfbuzzNG(struct QScriptItem const &,unsigned short const *,int,class QFontEngine *,class QVector<unsigned int> const &,bool)const " (?shapeTextWithHarfbuzzNG@QTextEngine@@ABEHABUQScriptItem@@PBGHPAVQFontEngine@@ABV?$QVector@I@@_N@Z)
      Qt5Gui.lib(qtextengine.obj) : error LNK2019: unresolved external symbol _hb_buffer_destroy referenced in function "private: int __thiscall QTextEngine::shapeTextWithHarfbuzzNG(struct QScriptItem const &,unsigned short const *,int,class QFontEngine *,class QVector<unsigned int> const &,bool)const " (?shapeTextWithHarfbuzzNG@QTextEngine@@ABEHABUQScriptItem@@PBGHPAVQFontEngine@@ABV?$QVector@I@@_N@Z)
      [...]
      

      I have surely misunderstood some step.
      In a newly installed Windows 7 machen I have install Visual Studio 15 Community edition, perl, python and msysgit.
      Then I have cloned qt5, and checkout v5.5.1 (also for submodules).
      I opened a cmd windows and setup the environment with:

      "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
      

      and then I have configured using:

      configure  -developer-build -opensource -nomake examples -nomake tests -mp -static -prefix "c:\Qt\Qt5-static" 
      

      finally nmake and nmake install, so in c:\Qt\Qt5-static I can find a tree with the static qt library.

      but when I try to build a simple project it fails the linker step.

      I cannot figure out why

      best regards
      Max

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @mastupristi "/Qt/Qt5-static/lib\Qt5PlatformSupport.lib" and the others are for sure invalid paths. Can you show your pro file?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • mastupristiM Offline
        mastupristiM Offline
        mastupristi
        wrote on last edited by
        #3
        QT       += core gui
        
        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
        CONFIG+= static
        
        TARGET = prova
        TEMPLATE = app
        
        SOURCES += main.cpp\
                dialog.cpp
        
        HEADERS  += dialog.h
        
        FORMS    += dialog.ui
        

        I tried with and without CONFIG+= static, but nothing changes.

        I call qmake with this command line:

        c:\Qt\Qt5-static\bin\qmake.exe prova.pro -r -spec win32-msvc2015
        

        best regard
        Max

        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