LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   QT3 Showdown (https://www.linuxquestions.org/questions/linux-general-1/qt3-showdown-26356/)

Zion 07-23-2002 02:07 AM

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

da Perp 07-23-2002 04:38 AM

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

Zion 07-23-2002 04:55 AM

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....:jawa: just joking

PEACE I'll post again...may remorse...ahh... da force be with you

Mara 07-23-2002 12:19 PM

When compiling use -I flag to use headers from a certain directory. In your case -I/usr/lib/qt3/include ,I suppose.

Zion 07-23-2002 11:07 PM

.......!!
 
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....

Zion 07-24-2002 12:02 AM

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:cry: :cry:

Mara 07-24-2002 02:49 PM

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)?

Zion 07-24-2002 09:46 PM

I do
 
Mara...I checked already...but they are there...
It's gonna stay a myth for a while:jawa:

Mara 07-25-2002 12:10 PM

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...

crashmeister 07-25-2002 03:37 PM

Now for something completely different - try compiling qt3 from source

Zion 07-25-2002 09:55 PM

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


All times are GMT -5. The time now is 09:00 AM.