Core Application built with a static build of Qt depends on system graphics libraries?

  • When I build my app using a build of Qt with shared libraries, ldd shows it does not depend on any systems graphic libs (as it should), but when I build the same app built with a static build of Qt, ldd shows it depends on libs like....,,,,,,,

    This does not make sense to me as my app does not use any gui or widgets.....QT+= core network
    I can see in the link in the static build is adding these libs for some reason.....-lX11-xcb -lX11 -lxcb -lEGL

    Static build of Qt configure.....
    ../qt-everywhere-opensource-src-5.9.2/configure -opensource -release -static -accessibility -no-icu -no-sql-sqlite -no-qml-debug -nomake examples -nomake tests -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtconnectivity -skip qtdeclarative -skip qtdoc -skip qtenginio -skip qtlocation -skip qtmultimedia -skip qtquick1 -skip qtquickcontrols -skip qtscript -skip qtsensors -skip qtserialport -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtxmlpatterns -prefix ~/Qt/5.9.2_static

  • Add to the .pro file....
    QT-= gui

  • Lifetime Qt Champion


    As an alternative QT = core network so you overwrite the content of the variable rather than adding to it.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.