Boost logo

Boost Users :

From: Welson Sun (welson_sun_at_[hidden])
Date: 2005-02-09 22:02:38


Hi,

I am new to C++ and I am converting a Java project to C++. Here is the
error I got:

g++ main.cpp
/tmp/ccraQoXW.o(.gnu.linkonce.t._ZN12OperatorTypeC1ERKS_+0x8): In
function `OperatorType::OperatorType[in-charge](OperatorType const&)':
: undefined reference to `vtable for OperatorType'
/tmp/ccraQoXW.o(.gnu.linkonce.t._ZN12OperatorTypeC2Ev+0x8): In function
`OperatorType::OperatorType[not-in-charge]()':
: undefined reference to `vtable for OperatorType'
/tmp/ccraQoXW.o(.gnu.linkonce.r._ZTI17BasicOperatorType+0x8): undefined
reference to `typeinfo for OperatorType'
/tmp/ccraQoXW.o(.gnu.linkonce.r._ZTI13BasicOperator+0x8): undefined
reference to `typeinfo for Operator'
collect2: ld returned 1 exit status

The source file is attached as main.cpp.

I guess this is an inheritence/polymorphism/runtime type kind of
problem, but I don't know how to make it right.




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net