我问的问题和this one一样。然而,给出的答案并没有让我忘记我的问题,而且这个问题是几年前提出的,所以我在想也许事情已经改变了。
当我试图在我的Mac (HighSiera10.13.4)上为OpenMP编译时,我得到了错误:
>$ gcc -fopenmp omp_accum_sum.cpp
clang: error: unsupported option '-fopenmp'AFAICT从信息mac端口给我,我有最新版本的gcc,clang和OpenMP安装:
>$ port installed gcc7
The following ports are currently installed:
gcc7 @7.3.0_1 (active)
>$ port installed libomp
The following ports are currently installed:
libomp @0.0_246703
libomp @0.0_261249
libomp @0.0_264411+universal
libomp @3.9.0_1+universal
libomp @3.9.1_0+universal
libomp @5.0.1_0+universal (active)
>$ port installed clang-6.0
The following ports are currently installed:
clang-6.0 @6.0.0_0+analyzer+libstdcxx (active)我在网上见过一些关于把gcc的指挥指向正确的gcc的事情,但如果这就是我要做的,我甚至都找不出正确的位置。谢谢。
发布于 2018-05-24 15:38:58
嗯,如果有人感兴趣的话,我找到了一个很好的/opt/local/bin/g++-mp-7编译器。
这需要大量的狩猎和啄食。在我看来,mac端口会有一些系统的方法来找到这样的东西。如果有人能说出那是什么,我还是会感激的。
https://stackoverflow.com/questions/50512337
复制相似问题