LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1155|回复: 2

编译qt/e下面的例子hello出错,请各位指点!!!

[复制链接]
发表于 2005-7-19 22:00:57 | 显示全部楼层 |阅读模式
我安装了qt/e 2.3.7,运行下面的例子checklists(在./examples/checklists下),使用./checklists -qws命令运行正常,我想重新make一下,结果在链接时报了好多相似的错,如下所示:
[root@wggredhat checklists]# make
g++  -c -I/usr/wgg/qt/qt-2.3.7/include -pipe -DQWS -fno-exceptions -fno-rtti -O2
-fno-default-inline -Wall -W -DNO_DEBUG  -o checklists.o checklists.cpp
g++  -c -I/usr/wgg/qt/qt-2.3.7/include -pipe -DQWS -fno-exceptions -fno-rtti -O2
-fno-default-inline -Wall -W -DNO_DEBUG  -o main.o main.cpp
/usr/wgg/qt/qt-2.3.7/bin/moc checklists.h -o moc_checklists.cpp
g++  -c -I/usr/wgg/qt/qt-2.3.7/include -pipe -DQWS -fno-exceptions -fno-rtti -O2
-fno-default-inline -Wall -W -DNO_DEBUG  -o moc_checklists.o moc_checklists.cpp
g++ -L/usr/wgg/qt/qt-2.3.7/lib -Wl,-rpath,/usr/wgg/qt/qt-2.3.7/lib   -o ./checklists checklists.o main.o moc_checklists.o  -lqte -lm
checklists.o(.gnu.linkonce.t._ZN10QDropEventC2ERK6QPointN6QEvent4TypeE+0x15): In
function `QDropEvent:DropEvent[not-in-charge](QPoint const&, QEvent::Type)':
: undefined reference to `vtable for QDropEvent'
checklists.o(.gnu.linkonce.t._ZN10QDropEventC2ERK6QPointN6QEvent4TypeE+0x1c): In
function `QDropEvent:DropEvent[not-in-charge](QPoint const&, QEvent::Type)':
: undefined reference to `vtable for QDropEvent'
checklists.o(.gnu.linkonce.t._ZN10QDropEventC1ERK6QPointN6QEvent4TypeE+0x15): In
function `QDropEvent:DropEvent[in-charge](QPoint const&, QEvent::Type)':
: undefined reference to `vtable for QDropEvent'

下面还有好多类似的错,请问这是为什么啊?我曾经make过啊,没出错,这次为什么出这么多错啊!!!谢谢各位了!!!
发表于 2005-7-23 14:08:31 | 显示全部楼层
可能缺少moc文件,用moc创建一个包含在源代码中
回复 支持 反对

使用道具 举报

发表于 2005-7-27 00:56:09 | 显示全部楼层
你要编译一个嵌入式的qt程序?你用的是什么板子?arm的?
用g++只能编出基于x86的qt程序啊
回复 支持 反对

使用道具 举报

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

本版积分规则

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