Install OpenMP in MacOS : Cannot find gcc option –without-multilib

I want to install OpenMP in my MacOS system, and there are plenty of tutorials about how to install OpenMP. Unfortunately, most of them cannot work on my computer. We I try to use   brew reinstall gcc --without-multilib ,the  --without-multilib  Option seems not be well supported.

I still do not know why this happens, may be caused by the newer MacOS, but we can use another approach mentions in  Clang + OpenMP Setup in macOS

Firstly, we use  brew install llvm  to install llvm. In my system  clang & clang++ was installed into  /usr/local/opt/llvm/bin and be overlapped by original  clang , We use the soft link to create an alias of new clang.

The openmp then works in my computer, we can use   clang-omp++ main.cpp -o main -fopenmp to compile an openmp program.

原创文章地址:【Install OpenMP in MacOS : Cannot find gcc option –without-multilib】,转载时请注明出处mhy12345.xyz

发表评论

电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.