<div dir="ltr"><div>Hi Tim and Zhang!</div><div><br></div><div>Thanks a lot! I should have read the docs carefully and dig more about LLVM :D</div><div><br></div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Best Regards,<div>Xing</div><div><div><br></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr"><a href="http://mayuyu.io">mayuyu.io</a> <<a href="mailto:admin@mayuyu.io">admin@mayuyu.io</a>> 于2018年6月1日周五 下午9:47写道:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div><span></span></div><div><div><span></span></div><div>You’ll need to link LLVM libraries.<div>I suggest you set up your project as a subproject under LLVM source tree and use CMake configs to properly (and easily!) link LLVM Libraries<br><br><div>Zhang</div><div><br>在 2018年6月1日,21:31,Xing GUO via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> 写道:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi,<br><br>I am very excited to take the awesome tutorial of implementing *Kaleidoscope*. But I got stuck here...<div><br></div><div>I have done the AST parsing, however, when I introduce these 'llvm/IR/*' headers, I got a compiling error... But if I delete these headers it runs well ...</div><div><br></div>"""headers<br>#include "llvm/IR/BasicBlock.h"<br>#include "llvm/IR/Constants.h"<br>#include "llvm/IR/DerivedTypes.h"<br>#include "llvm/IR/Function.h"<br>#include "llvm/IR/IRBuilder.h"<br>#include "llvm/IR/LLVMContext.h"<br>#include "llvm/IR/Module.h"<br>#include "llvm/IR/Type.h"<br>#include "llvm/IR/Verifier.h"<br>"""<div><br></div><div>"""error</div><div><div>$ g++ -I/usr/local/opt/llvm/include -L/usr/local/opt/llvm/lib -std=c++11 <a href="http://k-lang.cc" target="_blank">k-lang.cc</a></div><div>Undefined symbols for architecture x86_64:</div><div>  "llvm::DisableABIBreakingChecks", referenced from:</div><div>      llvm::VerifyDisableABIBreakingChecks in k-lang-14fa17.o</div><div>ld: symbol(s) not found for architecture x86_64</div><div>clang: error: linker command failed with exit code 1 (use -v to see invocation)</div></div><div>"""</div><div><br></div><div>My OS is MacOS High Sierra v10.13.3</div><div><br></div><div>Source Codes could be viewed on: [GitHub](<a href="https://github.com/Higuoxing/llvm-playground" target="_blank">https://github.com/Higuoxing/llvm-playground</a>)</div><div><br></div><div><div>I am still trying to google it ... and it would be great if someone could help me...</div><div><br></div><div>Again, thanks for awesome LLVM and this awesome tutorial :D<br><br>Best Regards,<br>Xing</div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>LLVM Developers mailing list</span><br><span><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a></span><br><span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></span><br></div></blockquote></div></div></div></div></blockquote></div>