Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, January 2008
Excessive use of -pthread :)


Message 1 in thread

Hi,

While using Qt 4.4-tp1 I noticed the following interesting little thing on 
Linux. I compile my little app that uses Phonon, Taglib and some other small 
features and noticed that -pthread is present on the link line "a few" times:

g++ -Wl,--no-undefined -Wl,-rpath,/opt/qt-4.4-tp1/lib 
-o sm <loads of object files>
-L/opt/qt-4.4-tp1/lib -llirc_client -ltag -lphonon -L/opt/qt-4.4-tp1/lib 
-lQtDBus -pthread -pthread -pthread -pthread -pthread -pthread -ldbus-1 -lQtXml 
-pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -L/usr/X11R6/lib 
-pthread -pthread -pthread -pthread -pthread -pthread -lQtSql -pthread -pthread -lQtGui -lpng 
-lSM -lICE -pthread -pthread -lXrender -lXrandr -lfreetype -lfontconfig -lXext -lX11 -lQtNetwork 
-pthread -pthread -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread

The .pro file contains nothing magical and apart from:

TEMPLATE     = app
TARGET       = sm 
DEPENDPATH  += .
INCLUDEPATH += .
CONFIG      += debug link_pkgconfig
LIBS        += -llirc_client
QT          += sql phonon network
PKGCONFIG   += taglib

it's just SOURCES, HEADERS, FORMS and RESOURCES. It's not that it bothers me 
that much, the app works just fine, but it looks quite funny. :)

Best regards,
    Jan Ekholm

-- 
 [ signature omitted ]