Enable OpenMP support in clang in Mac OS X (sierra & Mojave)

后端 未结 4 1353
长情又很酷
长情又很酷 2020-11-28 09:37

I am using Mac OS X Sierra, and I found that clang (LLVM version 8.1.0 (clang-802.0.38)) does not support OpenMP: when I run clang -fopenmp program_name.c, I go

4条回答
  •  无人及你
    2020-11-28 10:29

    Other people have given one solution (using Homebrew llvm). You can also use OpenMP with Apple Clang and Homebrew libomp (brew install libomp). Just replace a command like clang -fopenmp test.c with clang -Xpreprocessor -fopenmp test.c -lomp.

提交回复
热议问题