[cfe-dev] clang problem with virtual functions

Richard Smith richard at metafoo.co.uk
Sat Apr 7 10:29:29 PDT 2012


On Sat, Apr 7, 2012 at 9:29 AM, Jason Sachs <jmsachs at gmail.com> wrote:

> Undefined symbols for architecture x86_64:
>  "__ZdlPv", referenced from:
>      __ZN3BarD0Ev in opt1-kNcANv.o
>  "__ZTVN10__cxxabiv117__class_type_infoE", referenced from:
>      __ZTI3Foo in opt1-kNcANv.o
>  NOTE: a missing vtable usually means the first non-inline virtual
> member function has no definition.
>  "__ZTVN10__cxxabiv120__si_class_type_infoE", referenced from:
>      __ZTI3Bar in opt1-kNcANv.o
>  NOTE: a missing vtable usually means the first non-inline virtual
> member function has no definition.
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
>

You need to link in the appropriate C++ libraries for your platform. Use
clang++ to link.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120407/a09f72f3/attachment.html>


More information about the cfe-dev mailing list