<br><br><div class="gmail_quote">2012/3/14 =?utf-8?Q?=C3=93scar_Fuentes?= <span dir="ltr"><<a href="mailto:ofv@wanadoo.es">ofv@wanadoo.es</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">Jun-qi Deng <<a href="mailto:dengjunqi06323011@gmail.com">dengjunqi06323011@gmail.com</a>> writes:<br>
<br>
> I got your point. Thank you, and I'd like to provide the relative message<br>
> now. But firstly, what do you mean by the "relevant command generated by<br>
> your makefile"? What I can tell you now is:<br>
><br>
> The Error Message:<br>
> make[3]: Entering directory `/home/tang.kk/ppcg/ppcg/isl/interface'<br>
>   CXXLD  extract_interface<br>
> extract_interface.o:(.data.rel.ro._ZTI13MyASTConsumer[typeinfo for<br>
> MyASTConsumer]+0x10): undefined reference to `typeinfo for<br>
> clang::ASTConsumer'<br>
> collect2: ld returned 1 exit status<br>
<br>
</div>[snip]<br>
<br>
So you define a class MyAstConsumer that derives from clang::ASTConsumer<br>
and then the link fails because the typinfo for MyAstConsumer can not<br>
reference the typeinfo of clang::ASTConsumer, because the latter is<br>
undefined as a consecuence of building Clang with -fno-rtti.<br></blockquote><div><br>Oh, I got it! Thank you very much! It helps me a lot.<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<br>
In this case the right thing is to apply -fno-rtti to the specific<br>
source file that defines MyAstConsumer.<br>
<br>
Please note that deriving from a Clang/LLVM class is not something that<br>
all projects do. The typical compiler that uses LLVM as a backend does<br>
not need to derive from LLVM classes at all. Imposing -fno-rtti on those<br>
projects most likely would cause breakage on user's code.<br></blockquote><div><br>Best Regards!<br>TangKK <br></div></div><br>