linking problems
Michael Olbrich
michael.olbrich at gmx.net
Sun Dec 2 22:50:55 GMT 2001
Hi!
I'm writing a prgram with kdevelop. I started with a "KDE 2 nomal" project
but it's KDE3/QT3 now.
It was all ok until I did this:
class BasicListView : public KListView
{
Q_OBJECT
[...]
}
class RegionListView : public BasicListView
{
Q_OBJECT
[...]
}
then I get undefined references to all functions of BasicListView.
This only happes if the first class (BasicListView) is in some way derived
from QObject. What's going on here? What is kdevelop doing wrong here, or
did I miss something?
Michael
[...]
`/usr/local/eressea/kalec/kalec/listviewmodules'
c++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/opt/kde3/include
-I/share/cvs/kde3/qt-copy/include -I/usr/X11R6/include
-DQT_THREAD_SUPPORT -D_REENTRANT -O2 -O0 -g3 -pg -Wall -fno-exceptions
-fno-check-new -c basiclistview.cpp
[...]
rm -f liblistviewmodules.a
ar cru liblistviewmodules.a factionlistviewitem.o unitlistviewitem.o
regionlistviewitem.o basiclistview.o basiclistviewitem.o
basiclistview.moc.o liblistviewmodules_a_meta_unload.o
ranlib liblistviewmodules.a
[...]
make[3]: Entering directory `/usr/local/eressea/kalec/kalec'
/bin/sh ../libtool --mode=link --tag=CXX c++ -O2 -O0 -g3 -pg -Wall
-fno-exceptions -fno-check-new -o kalec -L/usr/X11R6/lib
-L/share/cvs/kde3/qt-copy/lib -lpthread -L/opt/kde3/lib -R /opt/kde3/lib
-R /share/cvs/kde3/qt-copy/lib -R /usr/X11R6/lib kalecview.o kalecdoc.o
kalec.o main.o kalecdoc.moc.o kalec.moc.o kalecview.moc.o
kalec_meta_unload.o ./configuration/libconfiguration.a
./dialogs/libdialogs.a ./communication/libcommunication.a
./viewmodules/libviewmodules.a ./viewmodules/tradestat/libtradestat.a
./viewmodules/map/libmap.a ./listviewmodules/liblistviewmodules.a
./viewmodules/regiontree/libregiontree.a -lqt-mt -lpng -lz -lm -ljpeg
-lXext -lX11 -lresolv -lSM -lICE -lkdecore -lkdeui -lkfile -lkfile -lkdeui
-lkdecore -lqt-mt -lpng -lz -lm -ljpeg -lXext -lX11 -lresolv -lSM -lICE
-lkfile -lkdeui -lkdecore -lqt-mt -lpng -lz -lm -ljpeg -lXext -lX11
-lresolv -lSM -lICE -lresolv
c++ -O2 -O0 -g3 -pg -Wall -fno-exceptions -fno-check-new -o kalec
kalecview.o kalecdoc.o kalec.o main.o kalecdoc.moc.o kalec.moc.o
kalecview.moc.o kalec_meta_unload.o -L/usr/X11R6/lib
-L/share/cvs/kde3/qt-copy/lib -L/opt/kde3/lib
./configuration/libconfiguration.a ./dialogs/libdialogs.a
./communication/libcommunication.a ./viewmodules/libviewmodules.a
./viewmodules/tradestat/libtradestat.a ./viewmodules/map/libmap.a
./listviewmodules/liblistviewmodules.a
./viewmodules/regiontree/libregiontree.a -lqt-mt -lpng -lz -lm -ljpeg
-lXext -lX11 -lresolv -lSM -lICE -L/opt/qt3/lib -lqt-mt -lpng -lz -ljpeg
-lX11 -lSM -lICE -L/usr/lib/gcc-lib/i386-linux/2.95.4 -lXext -lresolv -lm
-lqt-mt -lpng -lz -ljpeg -lX11 -lSM -lICE -lXext -lresolv -lm -lqt-mt
-lpng -ljpeg -lX11 -lSM -lICE -lXext -lresolv -lz -lm -lqt-mt -lpng -ljpeg
-lX11 -lSM -lICE -lXext -lresolv -lz -lm -lqt-mt -lpng -lz -ljpeg -lX11
-lSM -lICE -lXext -lresolv -lm -lqt-mt -lpng -lz -ljpeg -lX11 -lSM -lICE
-lXext -lresolv -lm -lqt-mt -lpng -lz -lm -ljpeg -lXext -lX11 -lresolv
-lSM -lICE /opt/kde3/lib/libkfile.so /opt/kde3/lib/libksycoca.so
/opt/kde3/lib/libkio.so /opt/kde3/lib/libkdesu.so -lutil
/opt/kde3/lib/libkssl.so -lqt-mt -lpng -ljpeg -lX11 -lSM -lICE -lXext
-lresolv -lz -lm /opt/kde3/lib/libkdeui.so -lqt-mt -lpng -lz -ljpeg -lX11
-lSM -lICE -lXext -lresolv -lm /opt/kde3/lib/libkdecore.so
/opt/kde3/lib/libDCOP.so -lpthread -lqt-mt -lpng -lz -ljpeg -lX11 -lSM
-lICE -ldl -lXext -lresolv -lstdc++ -lm -lc -lgcc -lqt-mt -lpng -lz -lm
-ljpeg -lXext -lX11 -lresolv -lSM -lICE -lresolv -Wl,--rpath
-Wl,/opt/kde3/lib -Wl,--rpath -Wl,/opt/kde3/lib -Wl,--rpath
-Wl,/share/cvs/kde3/qt-copy/lib -Wl,--rpath -Wl,/usr/X11R6/lib
./viewmodules/regiontree/libregiontree.a(regiontreeview.o): In function
`RegionTreeView::RegionTreeView(dataSync *, KalecApp *, QWidget *, char
const *)':
/usr/local/eressea/kalec/kalec/viewmodules/regiontree/regiontreeview.cpp:25: undefined
reference to `BasicListView::BasicListView(KalecApp *, QWidget *, char
const *)'
/usr/local/eressea/kalec/kalec/viewmodules/regiontree/regiontreeview.cpp:30: undefined
reference to `RegionListViewItem::RegionListViewItem(QListView *,
QSqlCursor *)'
./viewmodules/regiontree/libregiontree.a(regiontreeview.o): In function
`RegionTreeView::~RegionTreeView(void)':
/usr/local/eressea/kalec/kalec/viewmodules/regiontree/regiontreeview.cpp:35: undefined
reference to `BasicListView::~BasicListView(void)'
./viewmodules/regiontree/libregiontree.a(regiontreeview.moc.o): In
function `RegionTreeView::staticMetaObject(void)':
/usr/local/eressea/kalec/kalec/viewmodules/regiontree/regiontreeview.moc.cpp:54: undefined
reference to `BasicListView::staticMetaObject(void)'
./viewmodules/regiontree/libregiontree.a(regiontreeview.moc.o): In
function `RegionTreeView::qt_cast(char const *)':
/usr/local/eressea/kalec/kalec/viewmodules/regiontree/regiontreeview.moc.cpp:71: undefined
reference to `BasicListView::qt_cast(char const *)'
./viewmodules/regiontree/libregiontree.a(regiontreeview.moc.o): In
function `RegionTreeView::qt_invoke(int, QUObject *)':
/usr/local/eressea/kalec/kalec/viewmodules/regiontree/regiontreeview.moc.cpp:76: undefined
reference to `BasicListView::qt_invoke(int, QUObject *)'
./viewmodules/regiontree/libregiontree.a(regiontreeview.moc.o): In
function `RegionTreeView::qt_emit(int, QUObject *)':
/usr/local/eressea/kalec/kalec/viewmodules/regiontree/regiontreeview.moc.cpp:81: undefined
reference to `BasicListView::qt_emit(int, QUObject *)'
[...]
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list