<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Jan 31, 2011, at 11:19 AM, jignesh vasoya wrote:</div><blockquote type="cite">when i am trying to compile given source it gives linker error :<br><br><b>tutorial4.o:(.rodata._ZTIN5clang13MyASTConsumerE[typeinfo for clang::MyASTConsumer]+0x10): undefined reference to `typeinfo for clang::ASTConsumer'<br>

collect2: ld returned 1 exit status<br>make: *** [tutorial4] Error 1<br></b><br clear="all"><br>Source code is: all necessary header files are included and there is no syntax error in this source code, required libraries are also specified in make file.<br></blockquote><div><br></div>LLVM and Clang are compiled with -fno-rtti by default.  You have three options:</div><div>  - You can re-enable RTTI when you build LLVM and Clang.</div><div>  - If you don't use RTTI in your project, you can just compile with -fno-rtti.</div><div>  - You can compile every file that emits the vtable for this class with -fno-rtti.  The easier way to do this is to anchor the vtable to a particular file and compile that with -fno-rtti.</div><div><br></div><div>John.</div></body></html>