You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Max

Unregistered

1

Wednesday, July 14th 2004, 11:17am

undefined reference to..

I don't know if here's the right place to ask but, since I use only Linux I whant full compatibillity with KDE and I don't know what am I doning wrong:

#include <kfiledialog.h>

KFileDialog* dia = new KFileDialog ("/", "*", this, "dia",false);

*** error***

undefined reference to `KFileDialog::KFileDialog[in-charge](QString const&, QString const&, QWidget*, char const*, bool)'

Some tips for full compatibillity with KDE are allso welcome :)

thank you

tuxipuxi

Unregistered

2

Wednesday, July 14th 2004, 11:50am

You have to link the appropriate kde libs.
For KFileDialog, it's -lkio if I remember correctly.

Michael.

Max

Unregistered

3

Wednesday, July 14th 2004, 12:11pm

how do I do this in kdevelop?

f_edemar

Beginner

Posts: 14

Location: Sweden

  • Send private message

4

Thursday, July 15th 2004, 12:21am

Go to the "Automake manager"-tab, right-click on your project name in the list, choose "Options". Then switch to the tab "Libraries", click on the "Add"-button and either type "-lkio" or "$(LIB_KIO)".

Max

Unregistered

5

Thursday, July 15th 2004, 10:37am

It woks than you!

But when I use diferrent stuff, how do I know witch flags to use and how do I know their names?

anda_skoa

Professional

Posts: 1,273

Location: Graz, Austria

Occupation: Software Developer

  • Send private message

6

Thursday, July 15th 2004, 1:27pm

The library is usually named like the respective section in the API docs.

For example if a class is documented in kio, the lib is libkio, which means linker directive -lkio or variable $(LIB_KIO)

Cheers,
_
Qt/KDE Developer
Debian User

Posts: 1

Location: Argentina

  • Send private message

7

Tuesday, July 27th 2004, 5:10am

if just dont find the lib who belong to any class or function in the api, as anda_skoa explained, this are the most common link directives:


-lkdecore
-lkdeui

and more,.. just try if you cannot find them
"Power and Control, Weapons to build an Empire..... Weapons to destroy a dinasty"