[已解决]Ubuntu安装Qt4.5后的测试程序

软件和网站开发以及相关技术探讨
回复
头像
花布鱼
帖子: 15
注册时间: 2009-04-11 16:25

[已解决]Ubuntu安装Qt4.5后的测试程序

#1

帖子 花布鱼 » 2009-04-17 15:39

我在Ubuntu8.04中安装了Qt4.5-X11
然后按照网上的写了一个测试程序


----------------------------
#include <qapplication.h>
#include <qpushbutton.h>


int main( int argc, char **argv )
{
QApplication a( argc, argv );

QPushButton hello( "Hello world!", 0 );
hello.resize( 100, 30 );

a.setMainWidget( &hello );
hello.show();
return a.exec();
}
-------------------------

然后qmake -project 后出现了错误(如下)


程序 'qmake' 已包含在以下软件包中:
* libqt4-dev
* qt3-dev-tools
试试:apt-get install <选定的软件包>
bash: qmake:找不到命令


:em03 我是一只小菜鸟 不懂 不知哪位帮我解答一下 先谢过~~
上次由 花布鱼 在 2009-04-28 11:07,总共编辑 1 次。
dbzhang800
帖子: 3182
注册时间: 2006-03-10 15:10
来自: xi'an China
联系:

Re: Ubuntu安装Qt4.5后的测试程序

#2

帖子 dbzhang800 » 2009-04-17 18:43

1. qmake你都没有,所以请解释你的qt4.5是怎么装的
2. 你写的这个程序并不是qt4的程序

3.可以参考
http://wiki.ubuntu.org.cn/index.php?tit ... iant=zh-cn
头像
花布鱼
帖子: 15
注册时间: 2009-04-11 16:25

Re: Ubuntu安装Qt4.5后的测试程序

#3

帖子 花布鱼 » 2009-04-21 8:15

dbzhang800 写了:1. qmake你都没有,所以请解释你的qt4.5是怎么装的
2. 你写的这个程序并不是qt4的程序

3.可以参考
http://wiki.ubuntu.org.cn/index.php?tit ... iant=zh-cn


谢谢啊 我按照你给说的这个网页的内容重新安装了
之前是下载的Qt4.5的版本 然后在网上搜到很多的安装方法
不过发现都不如apt-get好用
winnux
帖子: 23
注册时间: 2008-10-16 16:54

Re: Ubuntu安装Qt4.5后的测试程序

#4

帖子 winnux » 2009-04-21 11:43

去QT官网下qt-sdk-linux-x86-opensource-2009.01.bin,直接安装就可以阿,带的Creator很好用了已经。
ieasylive
帖子: 72
注册时间: 2007-05-08 21:30

Re: Ubuntu安装Qt4.5后的测试程序

#5

帖子 ieasylive » 2009-04-28 10:22

环境变量没加上去,才找不到qmake.
头像
evan_ma
帖子: 31
注册时间: 2009-04-20 11:50

Re: Ubuntu安装Qt4.5后的测试程序

#6

帖子 evan_ma » 2009-04-29 10:11

winnux 写了:去QT官网下qt-sdk-linux-x86-opensource-2009.01.bin,直接安装就可以阿,带的Creator很好用了已经。
我裝的就是這個~~自帶qt4.5和qt cerater,designer。 不過測試的時候總是提示連接不到libXrender和libfontconfig。這兩個庫我是有的而且是最新的。可是ld找不到。這種問題怎麽解決呢?
還有libXrender和libfontconfig是做什麽的?沒用我就把它從makefile裏刪除了~~
呜,笨猪~~
回复