[cfe-dev] [libcxxabi]: undefined reference to 'typeinfo for void'
Howard Hinnant
hhinnant at apple.com
Tue Aug 21 18:41:56 PDT 2012
On Aug 21, 2012, at 9:30 PM, soaliap <soaliap at 126.com> wrote:
> I build libcxx and libcxxabi with my complier on linux, but when I linked a
> simple hello world program, it reported a error:
> ---------------------------------------------------
> libc++abi.so: undefined reference to 'typeinfo for void'
> ---------------------------------------------------
> I know "undefined reference" error occured when some symbols were not found,
> but 'typeinfo for void' seemed so odd!
> Anybody gives me some advice? Thanks!
I don't know what the problem is. But here is more info:
The file libcxxabi/src/private_typeinfo.cpp contains this:
// __fundamental_type_info
// This miraculously (compiler magic) emits the type_info's for:
// 1. all of the fundamental types
// 2. pointers to all of the fundamental types
// 3. pointers to all of the const fundamental types
__fundamental_type_info::~__fundamental_type_info()
{
}
void is a fundamental type. This is where 'typeinfo for void' should be defined.
Howard
More information about the cfe-dev
mailing list