You are not logged in.

1

Sunday, October 9th 2005, 10:54am

using KRun error :(

I write some code like this:

KURL desktopfile(tmp+*it);
KRun * exec = new KRun(desktopfile);

While I compile it.errors appear like this:

listbox.o(.text+0x1136): In function `listbox::startApp()':
/home/huting/Documents/Program/listbox/src/listbox.cpp:127: undefined reference to `KRun::KRun(KURL const&, unsigned int, bool, bool)'
collect2: ld returned 1 exit status

Why?

Posts: 2,162

Location: Graz, Austria

Occupation: Student

  • Send private message

2

Sunday, October 9th 2005, 4:06pm

Very likely you forgot to link with libkio

Cheers,
_
Qt/KDE Developer
Debian User

3

Monday, October 10th 2005, 1:48am

In kdevelop, How can I do?

thank you :))

Latem

Intermediate

  • "Latem" is male

Posts: 278

Location: New Brunswick, Canada

Occupation: Student/Programmer

  • Send private message

4

Monday, October 10th 2005, 3:50pm

In the make target options on the right, under the Libraries tag in "Link libraries outside the project (LDADD)", you can add $(LIB_KIO).

Latem
The march of progress:
C:
printf("%10.2f", x);
C++:
cout << setw(10) << setprecision(2) << showpoint << x;
Java:
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);

5

Tuesday, October 11th 2005, 12:40am

In the make target options on the right, under the Libraries tag in "Link libraries outside the project (LDADD)", you can add $(LIB_KIO)

--I just do that, But the error also:

config.pl: fast created 1 file(s).
config.status: executing depfiles commands
/bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -g3 -fno-inline -O0 -g3 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -o listbox -R /usr/lib -R /usr/lib/qt-3.3/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt-3.3/lib -L/usr/lib main.o listbox.o -lkdeui
listbox.o(.text+0x1136): In function `listbox::startApp()':
/home/huting/Documents/Program/listbox/src/listbox.cpp:125: undefined reference to `KRun::KRun(KURL const&, unsigned int, bool, bool)'
collect2: ld returned 1 exit status
gmake[2]:

Latem

Intermediate

  • "Latem" is male

Posts: 278

Location: New Brunswick, Canada

Occupation: Student/Programmer

  • Send private message

6

Tuesday, October 11th 2005, 2:12am

Try a clean build, and redo automake and friends. Along with -lkdeui there should be -lkio. It's not there.

Latem
The march of progress:
C:
printf("%10.2f", x);
C++:
cout << setw(10) << setprecision(2) << showpoint << x;
Java:
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
formatter.setMinimumFractionDigits(2);
formatter.setMaximumFractionDigits(2);
String s = formatter.format(x);
for (int i = s.length(); i < 10; i++) System.out.print(' ');
System.out.print(s);

7

Tuesday, October 11th 2005, 5:22am

Thanks !!

now it works right.