Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error encountered while doing a static build of a Qt application
QtWS25 Last Chance

Error encountered while doing a static build of a Qt application

Scheduled Pinned Locked Moved General and Desktop
static build5.2.1mingw32
2 Posts 2 Posters 1.2k 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.
  • C Offline
    C Offline
    Connie
    wrote on last edited by
    #1

    Hi,
    I am trying to do a static build of my Qt application on Window. I am using Qt from the "Qt Source Package, Full Framework with Windows style line endings 5.2.1"
    Below are the commands I did:
    configure -prefix %CD%\qtbase -skip qtwebkit -skip qtwebkit-examples -no-icu -qt-zlib -static -opengl desktop
    -commercial -confirm-license
    mingw32-make
    mingw32-make install

    However when I tried to static compile my Qt application, Project 1, I am seeing these errors below:
    C:/Qt5.2.1/qtbase/lib/libQt5Widgets.a(qwindowsxpstyle.o):qwindowsxpstyle.cpp:(.text+0x3afb): undefined reference to _imp__DeleteObject@4' c:/qt/tools/mingw48_32/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/bin/ld.exe: C:/Qt5.2.1/qtbase/lib/libQt5Widgets.a(qwindowsxpstyle.o): bad reloc address 0x2b4 in section .rdata'
    collect2.exe: error: ld returned 1 exit status

    My Project1.pro file has :
    QT += core gui sql network multimedia
    greaterThan(QT_MAJOR_VERSION, 4): QT += widget

    When I tried to static compile another Qt application, Project 2, I got this error.
    error: 'QSslSocket' does not name a type QSslSocket *m_psocket;

    My Project2.pro file has:
    QT += core sql network concurrent xml serialport
    QT -= gui

    Have I missed some options when I configured Qt source package in the first place?

    Any help provided is much appreciated.

    Regards,
    Connie

    1 Reply Last reply
    0
    • S Offline
      S Offline
      ScotV
      wrote on last edited by
      #2

      I have a similar issue as well.

      some error while compiling.

      although instead of undefined reference to i am getting something like deprecated function. No idea whats the problem.

      Thanks


      Scot V
      Development Team
      Fastest Web Browser

      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