LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 09-16-2004, 05:11 PM   #1
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Rep: Reputation: 30
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.
 
Old 09-16-2004, 05:22 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
I think this is how that command line should look

Code:
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.
 
Old 09-16-2004, 05:33 PM   #3
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
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.
 
Old 09-16-2004, 05:42 PM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
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.
 
Old 09-16-2004, 05:44 PM   #5
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
I believe this is the time when you learn about Makefiles
 
Old 09-16-2004, 05:52 PM   #6
parv
Member
 
Registered: Jul 2004
Location: USA
Distribution: Mint, Scientifc Linux, Ubuntu
Posts: 180

Original Poster
Rep: Reputation: 30
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.

thanks.
 
Old 09-16-2004, 06:00 PM   #7
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Yes you'll definitely need kdelibs-devel and probably qtlibs-devel as well.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How long does it take to compile the kernel on a slow machine? Shagrath239 Slackware 10 02-15-2005 12:11 AM
Command to time how long a program runs jing Linux - Newbie 1 07-19-2004 11:35 PM
Can 't compile because long string is involved Linh Programming 3 06-11-2003 06:52 PM
How long should it take to compile gcc? frankietomatoes Linux - General 2 05-08-2003 03:21 PM
How long does the mozilla compile? neo77777 General 11 07-04-2002 01:25 AM


All times are GMT -5. The time now is 05:12 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration