LinuxSir.cn,穿越时空的Linuxsir!

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

安装qt3的问题

[复制链接]
发表于 2006-10-1 10:32:18 | 显示全部楼层 |阅读模式
昨天用apt-get安装qt3开发环境,搞了一天,还是不能编译文档1里面helloworld,有哪位大侠帮我看看还少了什么。(我现在可以进kde,qmake已经安装,下面是一些shell输出)


>dpkg -l | grep qt3
ii  libqt3-compat- 3.3.4-3        Qt 1.x and 2.x compatibility includes
ii  libqt3-headers 3.3.4-3        Qt3 header files
ii  libqt3-i18n    3.3.4-3        i18n files for Qt3 library
ii  libqt3-mt-dev  3.3.4-3        Qt development files (Threaded)
ii  libqt3c102     3.3.4-3        Qt GUI Library, Version 3
ii  libqt3c102-mt  3.3.4-3        Qt GUI Library (Threaded runtime version), V
ii  qt3-assistant  3.3.4-3        The Qt3 assistant application
ii  qt3-designer   3.3.4-3        Qt3 Designer
ii  qt3-dev-tools  3.3.4-3        Qt3 development tools
ii  qt3-dev-tools- 3.3.4-3        Conversion utilities for Qt3 development
ii  qt3-dev-tools- 3.3.4-3        Tools to develop embedded Qt applications
ii  qt3-doc        3.3.4-3        Qt3 API documentation
ii  qt3-examples   3.3.4-3        Examples for Qt3
ii  qt3-linguist   3.3.4-3        The Qt3 Linguist
ii  qt3-qtconfig   3.3.4-3        The Qt3 Configuration Application

编译的输出:
$~/workplace/qt$ qmake -project
$~/workplace/qt$ ls
helloworld.cpp  packages  qt.pro
$~/workplace/qt$ qmake
$~/workplace/qt$ ls
helloworld.cpp  Makefile  packages  qt.pro
$~/workplace/qt$ make

g++  -o qt helloworld.o    -L/usr/X11R6/lib -lXext -lX11 -lm
helloworld.o(.text+0x30): In function `main':
: undefined reference to `QApplication:Application[in-charge](int&, char**)'
helloworld.o(.text+0x41): In function `main':
: undefined reference to `QString:String[in-charge](char const*)'
helloworld.o(.text+0x5f): In function `main':
: undefined reference to `QPushButton:PushButton[in-charge](QString const&, QWidget*, char const*)'
helloworld.o(.text+0x74): In function `main':
: undefined reference to `QString::shared_null'
helloworld.o(.text+0x7e): In function `main':
: undefined reference to `QStringData::deleteSelf()'
helloworld.o(.text+0xa6): In function `main':
: undefined reference to `QPushButton::resize(int, int)'
helloworld.o(.text+0xb2): In function `main':
: undefined reference to `QApplication::setMainWidget(QWidget*)'
helloworld.o(.text+0xba): In function `main':
: undefined reference to `QWidget::show()'
helloworld.o(.text+0xc2): In function `main':
: undefined reference to `QApplication::exec()'
helloworld.o(.text+0xcc): In function `main':
: undefined reference to `QPushButton::~QPushButton [in-charge]()'
helloworld.o(.text+0xd4): In function `main':
: undefined reference to `QApplication::~QApplication [in-charge]()'
helloworld.o(.text+0x104): In function `main':
: undefined reference to `QApplication::~QApplication [in-charge]()'
helloworld.o(.text+0x112): In function `main':
: undefined reference to `QString::shared_null'
helloworld.o(.text+0x11c): In function `main':
: undefined reference to `QStringData::deleteSelf()'
helloworld.o(.text+0x128): In function `main':
: undefined reference to `QPushButton::~QPushButton [in-charge]()'
helloworld.o(.gnu.linkonce.r._ZTV6QGList+0xc): undefined reference to `QGList::clear()'
helloworld.o(.gnu.linkonce.r._ZTV6QGList+0x10): undefined reference to `QGList::~QGList [in-charge]()'
helloworld.o(.gnu.linkonce.r._ZTV6QGList+0x14): undefined reference to `QGList::~QGList [in-charge deleting]()'
helloworld.o(.gnu.linkonce.r._ZTV6QGList+0x18): undefined reference to `QPtrCollection::newItem(void*)'
helloworld.o(.gnu.linkonce.r._ZTV6QGList+0x20): undefined reference to `QGList::compareItems(void*, void*)'
helloworld.o(.gnu.linkonce.r._ZTV6QGList+0x24): undefined reference to `QGList::read(QDataStream&, void*&)'
helloworld.o(.gnu.linkonce.r._ZTV6QGList+0x28): undefined reference to `QGList::write(QDataStream&, void*) const'
helloworld.o(.gnu.linkonce.r._ZTI6QGList+0x8): undefined reference to `typeinfo for QPtrCollection'
collect2: ld returned 1 exit status
make: *** [qt] 错误 1
发表于 2006-10-1 13:45:17 | 显示全部楼层
apt-get
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-10-1 17:06:42 | 显示全部楼层

我都是用apt-get的

dpkg -l出来的东西都是apt-get弄来的
回复 支持 反对

使用道具 举报

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

本版积分规则

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