I'm trying to build a program using OpenMP, but I'm not able to get clang to recognize the library. I'm using a newer version of clang:
λ clang++ --version
Apple LLVM version 7.0.2 (clang-700.1.81)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
And I'm on OS X 10.10.5. When I try compiling, this is the error message that I get:
λ clang++ -fopenmp src/maranj_NumberCheck.cpp
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I thought that OpenMP was included in Clang after 3.7, but I'm on 7.0.2, so I don't understand why I'm having this problem. I have seen this question, but that is over 3 years old, and I think that OpenMP wasn't a part of Clang yet.
What should I be doing differently?