6
votes

I was trying an openmp code with clang compiler as specified in

http://clang-omp.github.io/

I downloaded the code via git and did make and make install. It successfully installed the clang compiler with openmp support. But when I try to compile a sample code (specified in the above link), I get the following error :

/usr/bin/ld: cannot find -liomp5

I did not specify path to include and lib as mentioned in the site, but I intend to specify them while compiling on command line with -L and -I options.

$clang -I/usr/lib/gcc/i686-linux-gnu/4.6/include -fopenmp test.c -o test

However, I could not find path for iomp5 lib and hence I got the above error. Can someone please tell me how to resolve this?

1
Maybe you should first follow the usage steps provided on the site and see if it works. Furthermore, the library path is provided there: /install/prefix/lib:<OpenMP library path>. - Sebastian Dressler
@SebastianDressler I had difficulty in locating path of OpenMP library. Can you tell me how to find path of OpenMP libraray? - sarda

1 Answers

1
votes

At first you need to build openmp library libiomp5. You can take the latest source code here http://llvm.org/svn/llvm-project/openmp/trunk/