Paul Johnson
2008-Aug-20 20:45 UTC
[CentOS] qt3.3 is default in environment, I want it to be qt4
At the current time, the environment is using qt3 values, as in $ env | grep QT QTDIR=/usr/lib/qt-3.3 QTINC=/usr/lib/qt-3.3/include QTLIB=/usr/lib/qt-3.3/lib $ env | grep PATH PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/bin:/usr/bin:/home/pauljohn/bin I also have QT4 installed, and I want programs to find those libraries and include files instead of these ones. As far as I can tell, Centos uses the pkgconfig framework to let programs ask about the preferred libraries. $ /usr/bin/pkg-config --variable=prefix qt-mt /usr/lib/qt-3.3 And I see the file that pkgconfig is reading here: $ cat /usr/lib/pkgconfig/qt-mt.pc prefix=/usr/lib/qt-3.3 exec_prefix=${prefix} libdir=${prefix}/lib includedir=${prefix}/include qt_config=qt warn_on release incremental link_prl nocrosscompiler dlopen_opengl minimal-config small-config medium-config large-config full-config styles tools kernel widgets dialogs iconview workspace inputmethod network canvas table xml opengl sql styles tools kernel widgets dialogs iconview workspace network canvas table xml opengl sql release dll thread largefile stl ipv6 system-mng mng system-jpeg jpeg system-png png gif system-zlib nis cups bigcodecs x11sm xshape xinerama xcursor xrandr xrender xftfreetype xkb inputmethod dylib create_prl link_prl qt warn_on depend_includepath qmake_cache x11 x11inc create_libtool create_pc moc x11lib I do not know for sure if the environment is accessing the pkgconfig setup to get the information it has, but I know for sure that configure scripts are using pkg-config to ask which qt should be used. Each time I build a program, then, I have to reset QTDIR, QTLIB, QTINC, and the PATH. I guess my question is 1. is 3.3 preferred for some reason by the Centos framework? If a program looks for "qt-mt.pc", does that mean it wishes to use qt3.3 rather than qt4? 2. aside from just hand editing that file and changing the prefix to /usr/lib/qt4, how do I change the preferred QT. The qt4-devel package gives its own set of pc files, but I can't tell how they can be used in the environment.. -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas
Toshaan Bharvani
2008-Aug-20 22:13 UTC
[CentOS] qt3.3 is default in environment, I want it to be qt4
Paul Johnson wrote:> I guess my question is > > 1. is 3.3 preferred for some reason by the Centos framework? If a > program looks for "qt-mt.pc", does that mean it wishes to use qt3.3 > rather than qt4? >what program are we talking about?> 2. aside from just hand editing that file and changing the prefix to > /usr/lib/qt4, how do I change the preferred QT. The qt4-devel package > gives its own set of pc files, but I can't tell how they can be used > in the environment.. >add the following lines to .bash_profile in your home directory (or lib64 for 64bit), should make qt4 default for that user export QTDIR=/usr/lib/qt4 export QMAKESPEC=/usr/share/qt4/mkspecs/linux-g++/ PATH=$PATH:$HOME/bin:{QTDIR}/bin _________________________________________________________________ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20080820/200519f7/attachment-0005.html>