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. Undef. ref. __emutls on Qt 5.15.1 static Windows
Forum Updated to NodeBB v4.3 + New Features

Undef. ref. __emutls on Qt 5.15.1 static Windows

Scheduled Pinned Locked Moved Unsolved General and Desktop
static build
1 Posts 1 Posters 355 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.
  • M Offline
    M Offline
    MikePooh
    wrote on last edited by
    #1

    Hi all!

    I am building static app using Qt 5.15.1 + GStreamer 1.18.1 on Windows 10. For that purposes Qt 5.15.1 static has been built from source using Mingw 8.1.0 64bit with following configure:

    configure -static -platform win32-g++ -prefix "D:\Qt_Win\5.15.1\static_2\mingw81_64" -release -opensource -confirm-license -nomake examples -nomake tests -nomake tools -opengl desktop -no-angle -qt-sqlite -make libs -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype
    

    When I am trying to build my application with that Static Qt, I am getting follwong linker errors:

    D:\Qt_Win\5.15.1\static_2\mingw81_64\plugins\platforms\libqwindows.a(qwindowsservices.o):qwindowsservices.cpp:(.rdata$.refptr.__emutls_v._ZSt11__once_call[.refptr.__emutls_v._ZSt11__once_call]+0x0): undefined reference to `__emutls_v._ZSt11__once_call'
    D:\Qt_Win\5.15.1\static_2\mingw81_64\plugins\platforms\libqwindows.a(qwindowsservices.o):qwindowsservices.cpp:(.rdata$.refptr.__emutls_v._ZSt15__once_callable[.refptr.__emutls_v._ZSt15__once_callable]+0x0): undefined reference to `__emutls_v._ZSt15__once_callable'
    collect2.exe: error: ld returned 1 exit status
    

    Part of important qmake conf for the project

    TEMPLATE = app
    QT += widgets network multimedia xml
    QMAKE_CXXFLAGS += -O2 -Wall -Wextra -Werror=return-type -Wno-parentheses -Wno-switch -fdiagnostics-color=always -fno-diagnostics-show-caret -std=c++11 -pthread
    CONFIG += static
    
    win32 {
        LIBS += -LD:\gstreamer\1.0\mingw_x86_64\lib\ -lgstreamer-1.0.dll -lgobject-2.0.dll -lglib-2.0.dll -lgstvideo-1.0.dll
        INCLUDEPATH += D:\gstreamer\1.0\mingw_x86_64\include\gstreamer-1.0 D:\gstreamer\1.0\mingw_x86_64\include\glib-2.0 D:\gstreamer\1.0\mingw_x86_64\lib\glib-2.0\include
        QMAKE_LFLAGS += -static -static-libgcc -static-libstdc++
        DEFINES += STATIC
    }
    
    

    Some other of my applications builds fine with that Qt5.15.1 Static without any problems as well as current application builds fine with officialy downloaded Qt 5.15.1 (Dynamic).

    Will be appreciate for any help.

    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