LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-23-2002, 02:07 AM   #1
Zion
LQ Newbie
 
Registered: Jul 2002
Posts: 23

Rep: Reputation: 15
QT3 Showdown


Ok everyone..I know this has been dragged for a while but please help me in getting qt3 to work on my mandrake 8.2 with KDE 3 dualbooted with windows 2000 pro...!!

1.I've installed the qt3 and qt3-devel rpm's via the mandrake Package installer.

2.It has been saved into /usr/lib/qt3

3.I've added the QTDIR,PATH,LD_LIBRARY_PATH into the /etc/bashrc...to make it available for every user.

4.I copied the Hello World example from the QT3 docs and pasted it into Kate and saved it as Hello.cpp in /root/
(i was in root)

5.Then i just gcc -c Hello.cpp.....it says it can't find
the header files.

6.I tried doing this gcc -c -B /usr/lib/qt3/include Hello.cpp............same as above.

7.Here i am...i don't now what to do.....

Could someone please help me out???
I would truly appreciate it thanks!!
And yes all the files it looks for do exist in case someone asks.....PEACE
 
Old 07-23-2002, 04:38 AM   #2
da Perp
Member
 
Registered: Oct 2001
Location: the Netherlands
Distribution: Bear Linux (LFS 3.3)
Posts: 171

Rep: Reputation: 30
to compile a program, use the -o switch to name the output fie, followed by the actual program.

e.g.

cc -o hello hello.cpp

open the hello.cpp file and look at the #include lines at the top.
stdio.h, stdlib.h, time.h, math.h etc.etc. are all standard c libs. for any others .h files listed you need to locate the location of those files on your hard drive, copy them to the same dir as the hello program, and change the include lines pertaining to the .h files you just copied to read " " around the .h files instead of < >. hope you understand this a bit....


PEACE
 
Old 07-23-2002, 04:55 AM   #3
Zion
LQ Newbie
 
Registered: Jul 2002
Posts: 23

Original Poster
Rep: Reputation: 15
ofcourse!!!

Da Perp...that was the first things i thought of...making symlinks
or even hard ones , but then again i thought it would be overkill
to make links to HEADERS...AHHHHHahahah!!

< > to " "
Yes i understand what you say....i did that in windows sometimes....well...i'm afraid that is the only way out.
A bit overkill though...mhmhmhmh

Ok , i'll do it...and if by any clandastine chance it can't even find those headers after having moved them in to the same directory
as the cpp file i'll rip Tux's heart out.... just joking

PEACE I'll post again...may remorse...ahh... da force be with you
 
Old 07-23-2002, 12:19 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
When compiling use -I flag to use headers from a certain directory. In your case -I/usr/lib/qt3/include ,I suppose.
 
Old 07-23-2002, 11:07 PM   #5
Zion
LQ Newbie
 
Registered: Jul 2002
Posts: 23

Original Poster
Rep: Reputation: 15
.......!!

Ok...

now i tried Mara's suggestion:

1)g++/gcc/cc -o Hello.cpp -l/usr/lib/qt3/include Hello.cpp

but still the same mistake can't find blahblahblah...but they are there....
 
Old 07-24-2002, 12:02 AM   #6
Zion
LQ Newbie
 
Registered: Jul 2002
Posts: 23

Original Poster
Rep: Reputation: 15
God Allah Christ

I'm really in a bad bad mood now...I've just made put Hello.cpp into the include directory where all the headers
are located...i did gcc -o Hello.o Hello.cpp
and what do you think i got ? :

In file included from qobjectdefs.h:42,
from qwindowdefs.h:43,
from qwidget.h:42,
from qdesktopwidget.h:42,
from qapplication.h:42,
from Hello.cpp:1:
qglobal.h:567:21: qconfig.h: No such file or directory
In file included from qobjectdefs.h:42,
from qwindowdefs.h:43,
from qwidget.h:42,
from qdesktopwidget.h:42,
from qapplication.h:42,
from Hello.cpp:1:
qglobal.h:621:23: qfeatures.h: No such file or directory
In file included from qapplication.h:51,
from Hello.cpp:1:
quuid.h:42:21: qstring.h: No such file or directory

Can you believe this....???? i am totaly down now...Help me someone please...QUICK...

And yes i did change <> to "" in includes
 
Old 07-24-2002, 02:49 PM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You have problems only with some of the files: qconfig.h, qfeatures.h and qstring.h . Are they in a subdirectory (I don't have a machine with QT3 to check it now)?
 
Old 07-24-2002, 09:46 PM   #8
Zion
LQ Newbie
 
Registered: Jul 2002
Posts: 23

Original Poster
Rep: Reputation: 15
I do

Mara...I checked already...but they are there...
It's gonna stay a myth for a while
 
Old 07-25-2002, 12:10 PM   #9
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
From the errors you get it looks that many headers are found correctly (qwindowdefs.h, qwidget.h, qdesktopwidget.h, qapplication.h etc), but not all. There must be a difference between the two groups...
 
Old 07-25-2002, 03:37 PM   #10
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
Now for something completely different - try compiling qt3 from source
 
Old 07-25-2002, 09:55 PM   #11
Zion
LQ Newbie
 
Registered: Jul 2002
Posts: 23

Original Poster
Rep: Reputation: 15
Chrashmeister

Did that once too....have downloaded the tars...ran ./configure
make 'd' the whole thing ....same error......
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Qt3 SpEcIeS SUSE / openSUSE 3 04-22-2005 06:28 PM
Qt3.3 vs Qt 3.2 irfanhab Programming 0 05-11-2004 02:28 AM
About qt3... LI-6Y LUCY Programming 3 08-28-2003 09:45 AM
OS Showdown debate ... Windows vs Linux vs Mac ... Xstacy General 12 08-06-2003 11:19 AM
OS Showdown: Windows 2000 vs. Linux robeb General 4 08-12-2002 11:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:54 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