when i try to build it I get a linker error:
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "tst.h"
#include <qlabel.h>
#include <kmainwindow.h>
#include <klocale.h>
tst::tst()
: KMainWindow( 0, "tst" )
{
// set the shell's ui resource file
setXMLFile("tstui.rc");
KFileTreeView * tree = new KFileTreeView(this,"name");
KCombiView(this,"name");
KColorDialog * la = new KColorDialog(this,"name");
la->show();
}
tst::~tst()
{
}
|
the output(using kdevelop):
cd '/p/src/tst/debug/src' && WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" gmake -k tst
source='/p/src/tst/src/main.cpp' object='main.o' libtool=no depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' depmode=gcc3 /bin/sh /p/src/tst/admin/depcomp g++ -DHAVE_CONFIG_H -I. -I/p/src/tst/src -I.. -I/usr/kde/3.4/include -I/usr/qt/3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -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 -c -o main.o `test -f '/p/src/tst/src/main.cpp' || echo '/p/src/tst/src/'`/p/src/tst/src/main.cpp
/usr/qt/3/bin/moc /p/src/tst/src/tst.h -o tst.moc
source='/p/src/tst/src/tst.cpp' object='tst.o' libtool=no depfile='.deps/tst.Po' tmpdepfile='.deps/tst.TPo' depmode=gcc3 /bin/sh /p/src/tst/admin/depcomp g++ -DHAVE_CONFIG_H -I. -I/p/src/tst/src -I.. -I/usr/kde/3.4/include -I/usr/qt/3/include -I. -DQT_THREAD_SUPPORT -D_REENTRANT -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 -c -o tst.o `test -f '/p/src/tst/src/tst.cpp' || echo '/p/src/tst/src/'`/p/src/tst/src/tst.cpp
/p/src/tst/src/tst.cpp: In member function `tst::tst()':
/p/src/tst/src/tst.cpp:34: warning: unused variable `KFileTreeView*tree'
/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 tst -R /usr/kde/3.4/lib -R /usr/qt/3/lib -R /usr/lib -L/usr/lib -L/usr/qt/3/lib -L/usr/kde/3.4/lib main.o tst.o -lkdeui
tst.o(.text+0xdc): In function `tst::tst[not-in-charge]()':
/p/src/tst/src/tst.cpp:34: undefined reference to `KFileTreeView::KFileTreeView[in-charge](QWidget*, char const*)'
tst.o(.text+0xfc):/p/src/tst/src/tst.cpp:35: undefined reference to `KCombiView::KCombiView[in-charge](QWidget*, char const*)'
tst.o(.text+0x10a):/p/src/tst/src/tst.cpp:35: undefined reference to `KCombiView::~KCombiView [in-charge]()'
tst.o(.text+0x247): In function `tst::tst[in-charge]()':
/p/src/tst/src/tst.cpp:34: undefined reference to `KFileTreeView::KFileTreeView[in-charge](QWidget*, char const*)'
tst.o(.text+0x267):/p/src/tst/src/tst.cpp:35: undefined reference to `KCombiView::KCombiView[in-charge](QWidget*, char const*)'
tst.o(.text+0x275):/p/src/tst/src/tst.cpp:35: undefined reference to `KCombiView::~KCombiView [in-charge]()'
collect2: ld returned 1 exit status
gmake: *** [tst] Error 1
*** Exited with status: 2 ***
I think it is kind of strange that I can link against KColorDialog, but not against any in KIO. Maybe one can help me fiddling it out.
General Info:
Gentoo 2005.0, kde 3.4.0, kdelibs 3.4.1-r1
output of gcc -v:
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/specs
Configured with: /var/tmp/portage/gcc-3.3.5-r1/work/gcc-3.3.5/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.5 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.5/info --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/include/g++-v3 --host=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f77 --enable-shared --enable-threads=posix
Thread model: posix
gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)
thanks for your help