PDA

View Full Version : Qt+Qxt undefined referemce



ernie
10th October 2010, 14:02
hi all.
I'm trying to build project with QxtGlobalShortcut in linux.
Qt build static,qxt too.
my .pro file

CONFIG+=static
CONFIG+=qxt
QXT+= core gui

in .cpp file

#include <QxtGui>
....
....
QxtGlobalShortcut *shortcut = new QxtGlobalShortcut(qapp);
shortcut->setShortcut(QSequence("Ctrl+Shift+A"));
.....
.....

when i build it an error occured:

bin/linux/GoogleTray tmp/main.o tmp/config.o tmp/tray_icon.o tmp/preferences.o tmp/aboutdialog.o tmp/transparent_browser.o tmp/tray_object_js.o tmp/MD5.o tmp/Blowfish.o tmp/Endian.o tmp/qtsingleapplication.o tmp/qtlocalpeer.o tmp/dockarea.o tmp/dockwidget.o tmp/keysequenceedit.o tmp/cookieexceptionsmodel.o tmp/cookiemodel.o tmp/cookiejar.o tmp/autosaver.o tmp/networkcookiejar.o tmp/moc_tray_icon.o tmp/moc_preferences.o tmp/moc_aboutdialog.o tmp/moc_transparent_browser.o tmp/moc_tray_object_js.o tmp/moc_qtsingleapplication.o tmp/moc_qtlocalpeer.o tmp/moc_dockarea.o tmp/moc_dockwidget.o tmp/moc_keysequenceedit.o tmp/moc_cookieexceptionsmodel.o tmp/moc_cookiejar.o tmp/moc_cookiemodel.o tmp/moc_autosaver.o tmp/moc_networkcookiejar.o tmp/qrc_GoogleTray.o -L/usr/local/Trolltech/Qt-4.7.0/lib -lssl -lcrypto -ljpeg -lmng -ltiff -Wl,-rpath,/usr/local/Qxt/lib -L/usr/local/Qxt/lib -lQxtGui -lQxtCore -L/usr/local/Trolltech/Qt-4.7.0/plugins/imageformats -lqjpeg -lqgif -lqico -lqmng -lqsvg -lqtiff -L/usr/local/Trolltech/Qt-4.7.0/plugins/codecs -lqcncodecs -lqjpcodecs -lqkrcodecs -lqtwcodecs -lQtWebKit -L/usr/local/Trolltech/Qt-4.7.0/lib -L../JavaScriptCore/release -L/usr/X11R6/lib -ljscore -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -lQtGui -pthread -pthread -pthread -pthread -lgobject-2.0 -lSM -lICE -lXrender -lfontconfig -lfreetype -lXext -lX11 -lQtNetwork -pthread -pthread -lQtCore -lz -lm -ldl -pthread -lgthread-2.0 -lrt -lglib-2.0 -lpthread
tmp/tray_icon.o: In function `TrayIcon::TrayIcon(QApplication*)':
tray_icon.cpp:(.text+0xafa): undefined reference to `QxtGlobalShortcut::QxtGlobalShortcut(QObject*)'
tray_icon.cpp:(.text+0xb6b): undefined reference to `QxtGlobalShortcut::setShortcut(QKeySequence const&)'


why it can be? thanks

ernie
10th October 2010, 14:06
i use qt4.7 and qxt 0.6.0 (try with 0.7.0,but it didn't help)