LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 08-12-2006, 03:34 PM   #1
ecac
LQ Newbie
 
Registered: Jun 2006
Posts: 7

Rep: Reputation: 0
QT Libraries


Hello,

I am playing with Kubuntu to see if it will be a better fit for my laptop than my current FC5. First I want to know if I can run everything I need for my work, so I have created a virtual installation on another computer.

Some of my programs have to be compiled against QT libraries. For instance, one program has this line:
#include <qpainter.h>
On my Kubuntu installation I have this file on /usr/include/qt3/qpainter.h. I believe it is part of the libqt3-headers package.

However when I try to compile the code I get the error message "error: qpainter.h: No such file or directory".

On FC5 there are a couple of things that happen automatically that let me compile the code after installing the QT libraries:
  • The location of the libraries is defined on /etc/ld.so.conf.d/qt-i386.conf. The only line in there is /usr/lib/qt-3.3/lib.
  • The variable QTDIR is defined as /usr/lib/qt-3.3

So, after installing the QT libraries (qt-devel package) on FC5 I can compile my code without problems.

But on Kubuntu it seems that I need to configure some things manually. I have created the file /etc/ld.so.conf and added the line /usr/lib/qt3 and defined the variable QTDIR as /usr/lib/qt3 because that was the directory closest to what I expected. However I cannot compile the code.

I have 2 main questions:
  1. How do I set up Kubuntu so that I can compile code with references to QT libraries?
  2. How can I look into the contents of a package and also figure out which package a file belongs to? For instance, in FC5 the commands would be "rpm -ql qt-devel" and "rpm -qf /usr/lib/qt-3.3/include/qpainter.h".

Thank you very much for your help. Best regards,

Elias
 
Old 08-12-2006, 10:02 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Which version of qt are you running under FC5?
rpm -qa | grep qt

Brian1
 
Old 08-12-2006, 10:40 PM   #3
ecac
LQ Newbie
 
Registered: Jun 2006
Posts: 7

Original Poster
Rep: Reputation: 0
The versions of qt are:
qt-3.3.6-0.4.fc5
qt-devel-3.3.6-0.4.fc5
Thanks.

Elias
 
Old 08-13-2006, 07:35 AM   #4
alred
Member
 
Registered: Mar 2005
Location: singapore
Distribution: puppy and Ubuntu and ... erh ... redhat(sort of) :( ... + the venerable bsd and solaris ^_^
Posts: 658
Blog Entries: 8

Rep: Reputation: 31
although i never try qt but this is what i have done just now ::

i simply do an 'apt-get install qt3-examples' hoping that this will install the neccessary stuffs for future compilation of qt app ...

cd into "/usr/share/doc/qt3-examples/qt3-examples/" and ran './build-examples' and sucessfully compiled all the examples ...

theres a line in file "/usr/share/doc/qt3-examples/qt3-examples/build-examples" of
Code:
export QTDIR=/usr/share/qt3

you can try ::
dpkg-deb --contents /var/cache/apt/archives/some.deb
dpkg --search /usr/include/qt3/qpainter.h

and

http://www.debian.org/doc/FAQ/ch-pkgtools.en.html

or type 'file-roller' in terminal to extract and browse files ...



//hope this helps a little bit ...


.
 
Old 08-13-2006, 10:29 AM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
No idea as to the issue. Just wanted to make sure you did not have qt-3.3.6-11.1. I had similiar issues with that release. No issues with 3.3.6-11.0 or earlier versions. No issues with the one you have installed.

Sorry I couldn't be of more help.
Brian1
 
Old 08-13-2006, 03:28 PM   #6
ecac
LQ Newbie
 
Registered: Jun 2006
Posts: 7

Original Poster
Rep: Reputation: 0
Brian1,

Thanks anyway.


alred,

Thanks for your tips. I've been trying to figure out the minimum amount of configuration I needed to get my code to compile on Kubuntu. I took out the /usr/lib/qt3 line from /etc/ld.so.conf, ran ldconfig as root, and redefined QTDIR as /usr/share/qt3. Unfortunately, this didn't help matters. So I installed qt3-examples as you suggested. After this the code that was giving me trouble compiled. However, some other code still didn't compile because I needed qapp.h. This was overcome by installing libqt3-compat-headers. After this I was able to compile all my code.

In looking for packages that I needed to install in order to have the required files I found this website extremely helpful: http://packages.ubuntu.com/. I don't think I know of a similar website for FC.

Again thank you very much for steering me toward the solution.

Best regards,

Elias
 
Old 08-13-2006, 09:30 PM   #7
alred
Member
 
Registered: Mar 2005
Location: singapore
Distribution: puppy and Ubuntu and ... erh ... redhat(sort of) :( ... + the venerable bsd and solaris ^_^
Posts: 658
Blog Entries: 8

Rep: Reputation: 31
you may also try to have a look at qt4 , it does come with libqt4-qt3support ...

both fc and ubuntu work well with the tedious way(and fun too) but i think package manager of all sorts is the way to go ... eg. in ubuntu 'apt-get gcc cpp g++' may solved *most* of the problems ...


//anyway , glad to hear that you got your problems solved ...

.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
c libraries kpachopoulos Programming 1 10-19-2005 05:37 PM
Libraries hemmelig *BSD 3 04-19-2005 06:47 PM
Libraries lyar1031 Linux - Software 0 08-31-2004 07:23 PM
Libraries? where to get Magick211 Linux - Software 8 03-18-2004 09:53 PM
libraries exodist Linux - Software 9 09-04-2003 03:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration