Hi George,<br><br>Unless you already inserted the function into the module previously, it looks like your problem is here:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>

<p><span>Constant</span> *temp = M.<span>getFunction</span>(<span>"exit"</span>, fType);</p><br></div></blockquote><div><br>needs to be:<br><br>Constant* temp = M.getOrInsertFunction("exit", fType);<br>
<br>In LLVM, declarations are just functions without bodies.  A declaration (without a body) or definition (with a body) needs to be added for every function referenced in the module, including "standard" functions like exit.<br>
<br>Let me know if this helps.<br><br>-Joshua<br></div></div><br>