之前遇到过一次,这次又遇到,又想不起来了,搜了一通还是找到了上次搜索的结果,特此记录备忘:
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
===================
原因就是:有成员函数未定义...
本文解决了一个常见的GCC编译器错误——“undefined reference to vtable”,该问题通常由于成员函数未定义引起。文章引用了Gabriel的解答,解释了编译器如何处理vtable,并给出了排查解决方案。
947

被折叠的 条评论
为什么被折叠?



