在安装完 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 装上
Re: /usr/bin/ld: cannot find -lXtst
$ sudo aptitude install libxtst-dev
到此基本应该没有问题了,现在运行试一下效果吧,看看是不是快了很多。