你好,游客 登录 注册 搜索
背景:
阅读新闻

QtCreator4.5在Ubuntu下的安装

[日期:2009-06-28] 来源:华清远见嵌入式学院  作者:孙晓明 [字体:大 中 小]

在课堂上我们安装的QtCreator是windows的版本,而且编译的时候明显感觉很慢,于是我就找到了一个Linux版本的QtCreator,在Ubuntu9.04的操作系统上进行了安装。安装后编译尝试了一下,果然比在windows下要快很多。

我们可以到http://www.qtsoftware.com/downloads-cn 上下载最新的版本。qt-sdk-linux-x86-opensource-2009.02.bin

下载之后在打开终端执行:

1.给安装文件加上执行权限

chmod u+x qt-sdk-linux-x86-opensource-2009.02.bin

2.执行安装命令

./qt-sdk-linux-x86-opensource-2009.02.bin

在安装完 QtCreator 建立一个helloworld的工程进行编译,在编译的时候可能会出现如下错误:

/usr/bin/ld: cannot find -lfreetype

collect2: ld 返回 1

make[1]: *** [text] 错误 1

make[1]:正在离开目录 `/home/noah/qtWorkPlace/text'

make:离开目录“/home/noah/qtWorkPlace/text”

make: *** [debug] 错误 2

Exited with code 2.

Error while building project text

When executing build step 'Make'

解决方法:

在新立得里找 freetype,把那个dev版的libfreetype6-dev装上。

继续编译可能会出现如下错误:

/usr/bin/ld: cannot find -lgobject-2.0

collect2: ld 返回 1

make[1]:正在离开目录 `/home/noah/qtWorkPlace/text'

make:离开目录“/home/noah/qtWorkPlace/text”

make[1]: *** [text] 错误 1

make: *** [debug] 错误 2

Exited with code 2.

Error while building project text

When executing build step 'Make'

解决方法:

在新立得里找 gobject,把那个dev版的 libavahi-gobject-dev 装上。

继续编译可能会出现如下错误:

/usr/bin/ld: cannot find -lSM

collect2: ld 返回 1

make[1]:正在离开目录 `/home/noah/qtWorkPlace/text'

make[1]: *** [text] 错误 1

make: *** [debug] 错误 2

make:离开目录“/home/noah/qtWorkPlace/text”

Exited with code 2.

Error while building project text

When executing build step 'Make'

解决方法:

在新立得里找 libsm-dev 装上

继续编译可能会出现如下错误:

/usr/bin/ld: cannot find -lXrender

collect2: ld 返回 1

make[1]: *** [text] 错误 1

make[1]:正在离开目录 `/home/noah/qtWorkPlace/text'

make:离开目录“/home/noah/qtWorkPlace/text”

make: *** [debug] 错误 2

Exited with code 2.

Error while building project text

When executing build step 'Make'

解决方法:

在新立得里找 libxrender-dev 装上

继续编译可能会出现如下错误:

/usr/bin/ld: cannot find -lfontconfig

collect2: ld 返回 1

make[1]:正在离开目录 `/home/noah/qtWorkPlace/text'

make:离开目录“/home/noah/qtWorkPlace/text”

make[1]: *** [text] 错误 1

make: *** [debug] 错误 2

Exited with code 2.

Error while building project text

When executing build step 'Make'

解决方法:

在新立得里找 libfontconfig1-dev 装上

继续编译可能会出现如下错误:

/usr/bin/ld: cannot find -lXext

collect2: ld 返回 1

make[1]:正在离开目录 `/home/noah/qtWorkPlace/text'

make:离开目录“/home/noah/qtWorkPlace/text”

make[1]: *** [text] 错误 1

make: *** [debug] 错误 2

Exited with code 2.

Error while building project text

When executing build step 'Make'

解决方法:

在新立得里找 libxext-dev 装上

到此基本应该没有问题了,现在运行试一下效果吧,看看是不是快了很多。

作者:孙晓明,华清远见嵌入式学院讲师。

linux
相关资讯       Ubuntu 9.04  QtCreator 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款