PDA

View Full Version : what is wrong with my qt ?



lwb422
12th April 2010, 07:46
Redhat enterprise linux 5
gcc 4.1.2
qt 4.6
qt creator 1.3

I am a newbie for qt . It is my first program.



#include <QApplication>
#include <QLabel>

int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
return app.exec();
}


when I type the commond make,I get the words below!
[root@loclwb3 hello]# make
g++ -Wl,-O1 -Wl,-rpath,/opt/qtsdk-2010.02/qt/lib -o hello hello.o -L/opt/qtsdk-2010.02/qt/lib -lQtGui -L/opt/qtsdk-2010.02/qt/lib -L/usr/X11R6/lib -lQtCore -lpthread
/opt/qtsdk-2010.02/qt/lib/libQtGui.so: undefined reference to `FcFreeTypeQueryFace'
collect2: ld returned 1 exit status
make: *** [hello] Error 1

what can I do? thanks!

squidge
12th April 2010, 08:00
Does this (http://www.qtcentre.org/forum/f-qt-tools-3/t-centos-52-how-fix-libqtguiso-undefined-reference-fcfreetypequeryface-19479.html) help?

vishwajeet.dusane
12th April 2010, 08:26
http://www.qtcentre.org/forum/f-qt-tools-3/t-centos-52-how-fix-libqtguiso-undefined-reference-fcfreetypequeryface-19479.html

lwb422
12th April 2010, 09:37
Does this (http://www.qtcentre.org/forum/f-qt-tools-3/t-centos-52-how-fix-libqtguiso-undefined-reference-fcfreetypequeryface-19479.html) help?

I can't open the links CentOS 5.2 + Qt 4.5 + FcFeeTypeQueryFace and http://theitdepartment.wordpress.com/2009/03/
on that thread!:crying:

lwb422
12th April 2010, 13:26
I have installed fontconfig-devel-4.2.4, the same errors still exit.

lwb422
12th April 2010, 14:07
Thanks all. I got the answer on another place. Mybe It is not a perfect answer, but it in fact works.

download fontconfig-2.6.0 from http://www.fontconfig.org/release/

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