QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2350|回复: 2

如何在debian上安装qt3开发环境

[复制链接]
发表于 2006-10-1 15:06:54 | 显示全部楼层 |阅读模式
昨天用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::QApplication[in-charge](int&, char**)'
helloworld.o(.text+0x41): In function `main':
: undefined reference to `QString::QString[in-charge](char const*)'
helloworld.o(.text+0x5f): In function `main':
: undefined reference to `QPushButton::QPushButton[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+0x12: 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+0x1: undefined reference to `QPtrCollection::newItem(void*)'
helloworld.o(.gnu.linkonce.r._ZTV6QGList+0x20): undefined reference to `QGList:areItems(void*, void*)'
helloworld.o(.gnu.linkonce.r._ZTV6QGList+0x24): undefined reference to `QGList::read(QDataStream&, void*&)'
helloworld.o(.gnu.linkonce.r._ZTV6QGList+0x2: undefined reference to `QGList::write(QDataStream&, void*) const'
helloworld.o(.gnu.linkonce.r._ZTI6QGList+0x: undefined reference to `typeinfo for QPtrCollection'
collect2: ld returned 1 exit status
make: *** [qt] 错误 1
发表于 2006-10-2 12:03:10 | 显示全部楼层
helloworld程序是Qt几的语法?
回复

使用道具 举报

发表于 2006-10-17 21:49:22 | 显示全部楼层
debian我没用过
你的hello world源代码呢?

建议直接使用qt下的examples
另外自己手动编译qt
对自己学习还是很有帮助的
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-2 06:29 , Processed in 0.038633 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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