Solved 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....
libwayland-egl.so.1, libwayland-client.so.0, libwayland-cursor.so.0, libdrm.so.2, libX11-xcb.so.1, libX11.so.6, libEGL.so.1, libGL.so.1
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 -lEGLStatic 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 -
Hi,
As an alternative
QT = core network
so you overwrite the content of the variable rather than adding to it.