-   Programming (
-   -   how to type this long command to compile a kde program? (

parv 09-16-2004 04:11 PM

how to type this long command to compile a kde program?
trying to learn some basics of KDE programming.
according to the book, the command to compile a simple program is:
g++ khello.cpp -I$KDEDIR/include
I/usr/include/qt -L$KDEDIR/lib -lkdeui -lkdecore -ldl -lqt

i cannot understand how to type this command in fact.
what does the "." in the second line do?

I saved the command and did a cat -t -e -v to see how it looks and got:
g++ khello.cpp -I$KDEDIR/include$
M-BM-7 I/usr/include/qt -L$KDEDIR/lib -lkdeui -lkdecore -ldl -lqt$

so the "." is actually "M-BM-7". How to actually type this command?
Thanks very much.

leonscape 09-16-2004 04:22 PM

I think this is how that command line should look


g++ khello.cpp -I$KDEDIR/include -I/usr/include/qt -L$KDEDIR/lib -lkdeui -lkdecore -ldl -lqt
The dot should be a - it may simply be a mistake.

parv 09-16-2004 04:33 PM

but cannot compile because several headers are missing:
qstring.h: No such file or directory
kapp.h: No such file or directory
klined.h: No such file or directory

those header files are in the location defined by $KDELIB and $QTLIB.
i also tried to use the complete path name but did not work either :-(
so i am wondering if that dot really means something.

leonscape 09-16-2004 04:42 PM

Do you have $KDEDIRS set properly? The files that you are getting errors for should be in /usr/include/qt and $KDEDIRS/include

-I is for the include path.

Proud 09-16-2004 04:44 PM

I believe this is the time when you learn about Makefiles ;)

parv 09-16-2004 04:52 PM

sorry, i just find that klined.h is not available.
which package shall i install?
is it kdelibs-devel? tons of packages i have to install in order to
install this guy. and confliction exists which makes me no idea.
e.g., i am required to install alsa-lib, libasound etc. which i think
may not be relevant to my problem at all.


leonscape 09-16-2004 05:00 PM

Yes you'll definitely need kdelibs-devel and probably qtlibs-devel as well.

All times are GMT -5. The time now is 08:02 PM.