PDA

View Full Version : Why will my coreapplication need libQtGui.so.4 lib



yagabey
18th December 2008, 18:47
Hello,
I am writing a core application . I used no gui classes. But readelf -d output of my application is like that:

0x00000001 (NEEDED) Shared library: [libQtXml.so.4]
0x00000001 (NEEDED) Shared library: [libQtGui.so.4]
0x00000001 (NEEDED) Shared library: [libts-0.0.so.0]
0x00000001 (NEEDED) Shared library: [libQtNetwork.so.4]
0x00000001 (NEEDED) Shared library: [libQtCore.so.4]
0x00000001 (NEEDED) Shared library: [librt.so.1]
0x00000001 (NEEDED) Shared library: [libdl.so.2]
0x00000001 (NEEDED) Shared library: [libpthread.so.0]
0x00000001 (NEEDED) Shared library: [libstdc++.so.6]
0x00000001 (NEEDED) Shared library: [libm.so.6]
0x00000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x00000001 (NEEDED) Shared library: [libc.so.6]

Why does it need libQtGui.so.4 lib although none of my classes are gui classes?

ktk
18th December 2008, 19:05
Hello,
I am writing a core application . I used no gui classes. But readelf -d output of my application is like that:

0x00000001 (NEEDED) Shared library: [libQtXml.so.4]
0x00000001 (NEEDED) Shared library: [libQtGui.so.4]
[...]
Why does it need libQtGui.so.4 lib although none of my classes are gui classes?

How did you build your application?

Something in the build process seemingly added Gui and Network

jpn
18th December 2008, 19:07
Add


QT -= gui

to the .pro file.

yagabey
18th December 2008, 19:12
ok,

QT -= gui

works..thanks..