C++:Linker Error with Constructor of Abstract Class
Thorsten Gecks
gecks at rhrk.uni-kl.de
Mon Feb 21 14:42:16 GMT 2000
I have an abstract class in my class tree and the linker complains about
missing reference to constructor/destructor:
does anybody know, what my problem is ?
bin/sh ../libtool --silent --mode=link g++ -O0 -g3 -Wall -o nnsim
-L/usr/lib -L/usr/X11R6/lib -rpath /usr/lib -rpath /usr/X11R6/lib
anothertrie.o justatrie.o nnsimparseobjectexception.o justatrie.moc.o
nnsimabstractparsenode.moc.o nnsimdoc.moc.o nnsim.moc.o nnsimview.moc.o
nnsimabstractparsenode.o nnsimparseobject.o nnsimabstractparsenodeexception.o
nnsimview.o nnsimdoc.o nnsim.o main.o ./abstractparsenodes/libabstractparsenodes.a
./viewobjects/libviewobjects.a ./abstractparsenodes/units/libunits.a
-lkfile -lkfm -lkdeui -lkdecore -lqt -lXext -lX11
gmake[1]: Leaving directory `/home/student/nnsim/nnsim'
./abstractparsenodes/units/libunits.a(nnsimnormalunit.o): In function `QListT<NNSimConnection>::~QListT(void)':
/usr/include/qt/qlist.h(.text+0xf): undefined reference to `NNSimAbstractUnit::NNSimAbstractUnit(void)'
/usr/include/qt/qlist.h(.text+0x37): undefined reference to `NNSimAbstractUnit::~NNSimAbstractUnit(void)'
./abstractparsenodes/units/libunits.a(nnsimnormalunit.o): In function `NNSimNormalUnit::NNSimNormalUnit(NNSimParseObject &, NNSimNetwork *)':
/home/student/nnsim/nnsim/abstractparsenodes/units/nnsimnormalunit.cpp:44: undefined reference to `NNSimAbstractUnit::NNSimAbstractUnit(void)'
/home/student/nnsim/nnsim/abstractparsenodes/units/nnsimnormalunit.cpp:137: undefined reference to `NNSimConnection::NNSimConnection(NNSimParseObject &, NNSimNetwork *)'
/home/student/nnsim/nnsim/abstractparsenodes/units/nnsimnormalunit.cpp:150: undefined reference to `NNSimAbstractUnit::~NNSimAbstractUnit(void)'
./abstractparsenodes/units/libunits.a(nnsimnormalunit.o): In function `NNSimNormalUnit::~NNSimNormalUnit(void)':
/home/student/nnsim/nnsim/abstractparsenodes/units/nnsimnormalunit.cpp:159: undefined reference to `NNSimAbstractUnit::~NNSimAbstractUnit(void)'
./abstractparsenodes/units/libunits.a(nnsimnormalunit.moc.o): In function `NNSimNormalUnit::initMetaObject(void)':
/home/student/nnsim/nnsim/abstractparsenodes/units/nnsimnormalunit.moc.cpp:37: undefined reference to `NNSimAbstractUnit::className(void) const'
/home/student/nnsim/nnsim/abstractparsenodes/units/nnsimnormalunit.moc.cpp:51: undefined reference to `NNSimAbstractUnit::initMetaObject(void)'
/home/student/nnsim/nnsim/abstractparsenodes/units/nnsimnormalunit.moc.cpp:34: undefined reference to `NNSimAbstractUnit type_info function'
/home/student/nnsim/nnsim/abstractparsenodes/units/nnsimnormalunit.moc.cpp:34: undefined reference to `NNSimAbstractUnit type_info node'
collect2: ld returned 1 exit status
gmake[1]: *** [nnsim] Error 1
Thorsten Gecks
Universität Kaiserslautern
More information about the KDevelop
mailing list