PDA

View Full Version : QT4 and Fedora x86_64



sjohnson228
21st March 2011, 17:45
Hi,

I found that one of the build systems I am trying to use uses pkg-config to find the libraries and includes paths needed for QT4. However, this is not working correctly on my installation of QT4 on Fedora.

I can list all the files installed with "rpm -ql qt-devel" and I can find all the files but issuing the command " pkg-config Qt --cflags" returns an empty line (meaning it find the Qt.pc file but nothing more is listed - "pkg-config QtCore --cflags" works fine. It returns "-lQtCore"). Also "pkg-config Qt --libs" returns an empty line.

The contents of Qt.pc are as follows:
-----------------cut---------------
prefix=/usr/lib64/qt4
bindir=/usr/lib64/qt4/bin
datadir=/usr/lib64/qt4
demosdir=/usr/lib64/qt4/demos
docdir=/usr/share/doc/qt4
examplesdir=/usr/lib64/qt4/examples
headerdir=/usr/include
importdir=/usr/lib64/qt4/imports
libdir=/usr/lib64
moc=/usr/lib64/qt4/bin/moc
plugindir=/usr/lib64/qt4/plugins
qmake=/usr/lib64/qt4/bin/qmake
sysconfdir=/etc
translationdir=/usr/share/qt4/translations

Name: Qt
Description: Qt Configuration
Version: 4.7.1
-----------------cut---------------

Looking at the QtCore.pc files it seems like the Qt.pc file is missing something at the end. The QtCore.pc file has the following at the end:

-----------------cut---------------
.....
Name: Qtcore
Description: Qtcore Library
Version: 4.7.1
Libs: -L${libdir} -lQtCore
Libs.private: -L/usr/lib64 -lpthread -lz -lm -ldl -pthread -lgthread-2.0 -lrt -lglib-2.0
Cflags: -DQT_SHARED -I/usr/include -I${includedir}
-----------------cut---------------

So what happened to "Libs:", "Libs.private:", and "Cflags:" in Qt.pc? And what should they be? Or am I missing something. Should the makefile that looks for package "Qt" look for "Qtcore" instead for QT4??

Thanks!