<div dir="ltr">That did it, thanks for the help! For the future is there a set of documentation for these bindings, or their equivalent c functions? I tried looking but was having trouble finding anything that seemed to match.</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jun 29, 2016 at 1:35 AM Andrew Wilkins <<a href="mailto:axwalk@gmail.com">axwalk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, 29 Jun 2016 at 00:32 Brian Picciano via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have the following code to generate a really basic IR: <a href="http://gobin.io/LtdJ" target="_blank">http://gobin.io/LtdJ</a><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">And the output I get from it is: </span><a href="http://gobin.io/XgkH" target="_blank">http://gobin.io/XgkH</a></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">That IR code which is dumped seems to work fine if I do llc then gcc on it, so I'm not sure why it won't work through the engine. This is my first time using LLVM so I'm pretty new with all of it, any help would be greatly appreciated. Thanks!</span></div></div></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><div>Hi Brian,</div><div><br></div><div>The issue here is that "<span style="line-height:normal;white-space:pre-wrap">NewExecutionEngine" will create either an MCJIT- or an interpreter-based execution engine, and only the former will be able to resolve symbols in the parent process. MCJIT will only be used if you have called the appropriate initialisation functions first. If you add the following to the top of your main() function, it should work:</span></div><div><span style="line-height:normal;white-space:pre-wrap"><br></span></div><div><span style="line-height:normal;white-space:pre-wrap">    LinkInMCJIT()
    InitializeNativeTarget()
    InitializeNativeAsmPrinter()</span><span style="white-space:pre-wrap;line-height:normal">
</span></div><div><span style="white-space:pre-wrap;line-height:normal"><br></span></div><div><span style="white-space:pre-wrap;line-height:normal">Cheers,</span></div><div><span style="white-space:pre-wrap;line-height:normal">Andrew</span></div></div></div>
</blockquote></div>