[LLVMdev] (Newbie) Using lli with clang++?
Christopher Jones
chrisjones.lambda at gmail.com
Thu Mar 1 19:24:09 PST 2012
Hello all,
I'm brand new to using LLVM and am having trouble using lli with a C++
program. I tried to compile the following:
#include<iostream>
using namespace std;
int main()
{
cout << "Hello, world!" << endl;
return 0;
}
When I compile directly to an executable with the following command, all is
well:
$ clang++ -O3 hello.cpp -o hello
But when I try to produce a bitcode file, I get an error:
$ clang++ -O3 -emit-llvm hello.cpp -c -o hello.bc
$ lli hello.bc
LLVM ERROR: Program used external function
'_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l'
which could not be resolved!
I'm running this on x86_64. I'd appreciate any help about what I'm doing
wrong.
Thanks!
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120301/1f689dc3/attachment.html>
More information about the llvm-dev
mailing list