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.


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