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. Linker errors while static building Qt5 with mingw on Windows

Linker errors while static building Qt5 with mingw on Windows

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 481 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.
  • S Offline
    S Offline
    scippie
    wrote on last edited by scippie
    #1

    Info: qt 5.14.0, mingw 730_64

    To find out if Qt is our way to go, I am trying to set up a statically linked Qt installation on a Windows machine. I have followed the steps on https://wiki.qt.io/Building_a_static_Qt_for_Windows_using_MinGW and have studied the powershell script to do it manually because the script failed.

    We need a static build to create a static executable. If this succeeds, we will look into buying a license because I understand that we need it if we can't share the source code.

    The building starts up (mingw32-make) and takes a long time until it stops with linker errors on libqtiff.a(tif_pixarlog.o). I didn't enable tiff in my configuration, but it still seems to build it. It seems to be missing zlib references.

    ./configure.bat -static -release -platform win32-g++ -prefix C:\Qt\Static\5.14.0\ -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -opensource -confirm-license -skip qtwebengine -make libs -nomake tools -nomake examples -nomake tests
    
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_pixarlog.o):tif_pixarlog.c:(.text$PixarLogVSetField+0x4f): undefined reference to `deflateParams'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_pixarlog.o):tif_pixarlog.c:(.text$PixarLogCleanup+0xcf): undefined reference to `inflateEnd'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_pixarlog.o):tif_pixarlog.c:(.text$PixarLogCleanup+0xd6): undefined reference to `deflateEnd'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_pixarlog.o):tif_pixarlog.c:(.text$PixarLogPostEncode+0x2c): undefined reference to `deflate'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_pixarlog.o):tif_pixarlog.c:(.text$PixarLogEncode+0x101f): undefined reference to `deflate'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_pixarlog.o):tif_pixarlog.c:(.text$PixarLogDecode+0x122): undefined reference to `inflate'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_pixarlog.o):tif_pixarlog.c:(.text$PixarLogSetupEncode+0xee): undefined reference to `deflateInit_'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_pixarlog.o):tif_pixarlog.c:(.text$PixarLogSetupDecode+0x18b): undefined reference to `inflateInit_'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_pixarlog.o):tif_pixarlog.c:(.text$PixarLogPreEncode+0x76): undefined reference to `deflateReset'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_pixarlog.o):tif_pixarlog.c:(.text$PixarLogPreDecode+0x76): undefined reference to `inflateReset'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPCleanup+0x64): undefined reference to `deflateEnd'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPCleanup+0x76): undefined reference to `inflateEnd'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPEncode+0x88): undefined reference to `deflate'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPPostEncode+0x33): undefined reference to `deflate'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPPreEncode+0x6f): undefined reference to `deflateReset'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPSetupEncode+0x43): undefined reference to `inflateEnd'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPSetupEncode+0x68): undefined reference to `deflateInit_'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPDecode+0xb8): undefined reference to `inflate'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPPreDecode+0x72): undefined reference to `inflateReset'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPSetupDecode+0x40): undefined reference to `deflateEnd'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPSetupDecode+0x6e): undefined reference to `inflateInit_'
    C:\Qt\Static\src\qt-everywhere-src-5.14.0\qtimageformats\plugins\imageformats\libqtiff.a(tif_zip.o):tif_zip.c:(.text$ZIPVSetField+0x3c): undefined reference to `deflateParams'
    collect2.exe: error: ld returned 1 exit status
    mingw32-make[3]: *** [Makefile:76: ../../bin/qml.exe] Error 1
    mingw32-make[3]: Target 'first' not remade because of errors.
    mingw32-make[3]: Leaving directory 'C:/Qt/Static/src/qt-everywhere-src-5.14.0/qtdeclarative/tools/qml'
    mingw32-make[2]: *** [Makefile:158: sub-qml-make_first] Error 2
    mingw32-make[2]: Target 'first' not remade because of errors.
    mingw32-make[2]: Leaving directory 'C:/Qt/Static/src/qt-everywhere-src-5.14.0/qtdeclarative/tools'
    mingw32-make[1]: *** [Makefile:78: sub-tools-make_first] Error 2
    mingw32-make[1]: Target 'first' not remade because of errors.
    mingw32-make[1]: Leaving directory 'C:/Qt/Static/src/qt-everywhere-src-5.14.0/qtdeclarative'
    mingw32-make: *** [Makefile:342: module-qtdeclarative-make_first] Error 2
    mingw32-make: Target 'first' not remade because of errors.
    

    What am I doing wrong or how can I fix this?

    Additional question: can anyone tell me how to make sure openssl is also included? Adding -openssl-linked to configure doesn't seem to work.

    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