linux 下QT 程序编译链接两个错误

来源:互联网 发布:学会c语言能干什么 编辑:程序博客网 时间:2024/04/26 23:00

一、/opt/qtsdk-2010.02/qt/lib/libQtGui.so:undefined reference to `FcFreeTypeQueryFace'

 

If youget this error under RHEL or CentOS 5.x:

/home/esutton/qtsdk-2010.02/qt/lib/libQtGui.so:undefined reference to `FcFreeTypeQueryFace'

 

collect2:ld returned 1 exit status Apparently libQtGui.so fails trying to use thelibfontconfig `FcFreeTypeQueryFace' method.

 

Prior toversion 2.4.2 it either did not exist or perhaps the signature was changed inversion 2.4.2. Not sure which, but an updated version needs to be installed to:'''/usr/lib/libfontconfig.so.1'''

 

How to Fix

Downloadsources and configure to install where it expects to find it:

 

cd/usr/src

wget http://fontconfig.org/release/fontconfig-2.4.2.tar.gz

 tar -zxf fontconfig-2.4.2.tar.gz

cdfontconfig-2.4.2

./configure-prefix=/usr

make

makeinstall

 

二、/opt/qtsdk-2010.02/qt/lib/libQtGui.so:Undefined reference to “FT_Library_SetLcdFilter”

 

原因是缺少freetype或者版本过低,下载安装freetype-2.4.4:

./configure--sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man

 make

make install

原创粉丝点击