apple clang -fopenmp not working

匆匆过客 提交于 2019-12-04 00:24:38

问题


I am trying to use openmp with Apple clang but can't make it work. I did download and compile the openmp library from llvm. My problem is that clang doesn't recognize the -fopenmp flag. I get the following error:

clang: error: unsupported option '-fopenmp'

I have version 8 of Xcode and clang. Any help would be much appreciated.


回答1:


From what I learned so far is that clang that comes with xcode does not support openmp. Also, the versions are different. So clang that comes with xcode 8 has version 8...

The best solution I have found so far is to install clang using homebrew: brew install llvm --with-clang. Right now I got version 3.9.0 and it does support openmp, so it solves my problem.



来源:https://stackoverflow.com/questions/40095958/apple-clang-fopenmp-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!