QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1134|回复: 4

这是什么错误阿!

[复制链接]
发表于 2006-1-21 13:56:31 | 显示全部楼层 |阅读模式
main.o: In function `MyTray':
/x0soft/star/main.cpp:35: undefined reference to `KSystemTray::KSystemTray(QWidget*, char const*)'
/x0soft/star/main.cpp:43: undefined reference to `KSystemTray::~KSystemTray()'
/x0soft/star/main.cpp:35: undefined reference to `KSystemTray::KSystemTray(QWidget*, char const*)'
/x0soft/star/main.cpp:43: undefined reference to `KSystemTray::~KSystemTray()'
main.o: In function `MyWidget':
/x0soft/star/main.cpp:68: undefined reference to `KGlobal::instance()'
/x0soft/star/main.cpp:68: undefined reference to `KSystemTray::loadIcon(QString const&, KInstance*)'
/x0soft/star/main.cpp:68: undefined reference to `KGlobal::instance()'
/x0soft/star/main.cpp:68: undefined reference to `KSystemTray::loadIcon(QString const&, KInstance*)'
main.o: In function `main':
/x0soft/star/main.cpp:206: undefined reference to `KApplication::KApplication(int&, char**, QCString const&, bool, bool)'
/x0soft/star/main.cpp:211: undefined reference to `KApplication::~KApplication()'
/x0soft/star/main.cpp:207: undefined reference to `KApplication::~KApplication()'
main.o: In function `MyTray::mousePressEvent(QMouseEvent*)':
/x0soft/star/main.cpp:56: undefined reference to `KSystemTray::mousePressEvent(QMouseEvent*)'
main.o.gnu.linkonce.r._ZTV6MyTray+0xc): undefined reference to `KSystemTray::className() const'
main.o.gnu.linkonce.r._ZTV6MyTray+0x10): undefined reference to `KSystemTray::qt_cast(char const*)'
main.o.gnu.linkonce.r._ZTV6MyTray+0x14): undefined reference to `KSystemTray::qt_invoke(int, QUObject*)'
main.o.gnu.linkonce.r._ZTV6MyTray+0x1: undefined reference to `KSystemTray::qt_emit(int, QUObject*)'
main.o.gnu.linkonce.r._ZTV6MyTray+0x1c): undefined reference to `KSystemTray::qt_property(int, int, QVariant*)'
main.o.gnu.linkonce.r._ZTV6MyTray+0xa0): undefined reference to `KSystemTray::setCaption(QString const&)'
main.o.gnu.linkonce.r._ZTV6MyTray+0x120): undefined reference to `KSystemTray::mouseReleaseEvent(QMouseEvent*)'
main.o.gnu.linkonce.r._ZTV6MyTray+0x140): undefined reference to `KSystemTray::enterEvent(QEvent*)'
main.o.gnu.linkonce.r._ZTV6MyTray+0x17c): undefined reference to `KSystemTray::showEvent(QShowEvent*)'
main.o.gnu.linkonce.r._ZTV6MyTray+0x1f0): undefined reference to `KSystemTray::setPixmap(QPixmap const&)'
main.o:(.gnu.linkonce.r._ZTV6MyTray+0x204): undefined reference to `KSystemTray::contextMenuAboutToShow(KPopupMenu*)'
main.o:(.gnu.linkonce.r._ZTV6MyTray+0x20: undefined reference to `KSystemTray::virtual_hook(int, void*)'
main.o:(.gnu.linkonce.r._ZTI6MyTray+0x: undefined reference to `typeinfo for KSystemTray'
main.o: In function `KSystemTray::metaObject() const':
/usr/include/ksystemtray.h:65: undefined reference to `KSystemTray::staticMetaObject()'
main.o: In function `~MyTray':
/x0soft/star/main.cpp:211: undefined reference to `KSystemTray::~KSystemTray()'
/x0soft/star/main.cpp:211: undefined reference to `KSystemTray::~KSystemTray()'
collect2: ld returned 1 exit status
make: *** [star] 错误 1
 楼主| 发表于 2006-1-21 13:58:05 | 显示全部楼层
这次rc3的qt好像有问题阿
回复

使用道具 举报

发表于 2006-1-21 21:04:39 | 显示全部楼层
1。看这个KSystemTray类的头文件是否正确包含
2。看是否正确链接了这个类所在的动态链接库

如果你所有的事情都是qmake帮你做的,那自己再查查吧,我没用过这个类,上面只是从错误输出的,应该是原因2。
回复

使用道具 举报

发表于 2006-1-21 21:23:07 | 显示全部楼层
加 -lkdeui 试试
回复

使用道具 举报

 楼主| 发表于 2006-1-22 14:16:09 | 显示全部楼层
哈哈 谢谢 yunfan 阿 这个加的dd是什么意思阿 加完后就好了  
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-3 00:38 , Processed in 0.045248 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表