[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Linking trouble
From:       Michael Brade <Michael.Brade () informatik ! uni-muenchen ! de>
Date:       2000-12-23 19:22:10
[Download RAW message or body]

Hi,

> Im trying to follow the "KDE 2.0 Tutorial" on develop.kde.org. My problem
> is that I can compile to *.o files but not but not link to an executable.
>
> How do I know which flags to use ( -lkdecore -lkdeui ..)? Is there a script
> that help you bild Makefile's that are general for KDE program ( I dont
> quite understand how automake/autoconf works despite some reading on the
> subject)
Hmm, if you have the kdelibs documentation handy you will find directories 
(or better sections) like kdecore, khtml, kdeui... So you can find the 
complete documentation for every KDE library in one directory. If you include 
headers you found in those sections you have to add exactly the name of the 
section as library to g++. If you don't have the libs - most methodnames say 
it all ;-) You'll get the feeling for this as time goes by.

But the easiest way to do this is to use KDevelop - you just have to click on 
the libraries you want to include... Try out KDevelop 1.3 ;-)

> It is quite frustrating not to be able to run bulid and see the result
> after an afternoons hard copy-pasting :)
:-)

> [ola@h194n1fls2o997 p5_]$ make p5
> g++ -L/usr/lib -L/usr/lib/qt-2.2.1/lib -lkdeui -lkdecore  -lkio -lqt -ldl
> -o p5 p5.o
You need to add -lkhtml and the other (previously compiled) objects main.o and
moc_p5.o (or whatever the compiled moc-output is called)

Ciao,
  Michael

-- 

       Some operating systems are called `user friendly',
             Linux however is `expert friendly'.
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic