再次遇到 undefined reference to `vtable for XXXX'

来源:互联网 发布:第三方数据服务商 编辑:程序博客网 时间:2024/06/05 01:04
 

之前遇到过一次,这次又遇到,又想不起来了,搜了一通还是找到了上次搜索的结果,特此记录备忘:

http://bytes.com/topic/c/answers/161894-undefined-reference-vtable

===================

That is the most obscure error message the gcc produces, but the reason
is usually simple:

The compiler has to put the vtable into an object file. It puts it into
the object file where the definition of the first non-inline member
function is. If it is missing, you get this rather unhelpful linker
error. Please check the existence of the definitions of your member
functions.

Gabriel

===================

 

原因就是:有成员函数未定义...