Q:

Execute Openmp program in LLVM-3.0

I generated a .ll file using llvm-gcc for a Openmp program(written in c). 
Then Optimized using opt(version 3.0)
But when I try to execute the optimized .ll file using lli or llvm-ld, getting the following errors,
        LLVM ERROR: Program used external function 'GOMP_parallel_start' which could not be resolved! 

Here is the step I followed,
   $ llvm-gcc -emit-llvm loop11.c -fopenmp -o loop.ll -S
   $ opt -O3  loop.ll -o loop.opt.ll -S
   $ lli loop.opt.ll
    LLVM ERROR: Program used external function 'GOMP_parallel_start' which could not be resolved! 

Please help me to solve this problem. 
Thanks in advance. 

A:

You have to link / load the OpenMP runtime, libgomp in this case.