4

I am trying to run simple code in llvm lli (according to Getting Started with the LLVM System)

#include <stdio.h>

int main() {
  printf("hello world\n");
  return 0;
}

I got the .bc file with

clang –O3 –emit-llvm hello.c –c –o hello.bc

and

 lli hello.bc

but getting the next error:

LLVM ERROR: Program used external function '_printf' which could not be resolved!

I think it is very basic error, but I didn't understand what I did wrong. working on windows.

yehudahs
  • 2,488
  • 8
  • 34
  • 54

0 Answers0