Hello all,<div><br></div><div>I'm brand new to using LLVM and am having trouble using lli with a C++ program.  I tried to compile the following:</div><div><br></div><div><div>#include<iostream></div><div>using namespace std;</div>
<div>int main()</div><div>{</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>cout << "Hello, world!" << endl;</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>return 0;</div>
<div>}</div></div><div><br></div><div>When I compile directly to an executable with the following command, all is well:</div><div>$ clang++ -O3 hello.cpp -o hello</div><div><br></div><div>But when I try to produce a bitcode file, I get an error:</div>
<div><br></div><div>$ clang++ -O3 -emit-llvm hello.cpp -c -o hello.bc</div><div>$ lli hello.bc</div><div>LLVM ERROR: Program used external function '_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l' which could not be resolved!</div>
<div><br></div><div>I'm running this on x86_64.  I'd appreciate any help about what I'm doing wrong.</div><div>Thanks!</div><div><br></div><div>Chris</div>