Error using mex clang: error: unsupported option '-fopenmp' in mac
最近试图在mac上使用MRST 软件,但是在计算过程中弹出了如下错误信息:
Error using mex clang: error: unsupported option '-fopenmp'
搜了很多国内外的网站,现在整理如下
https://stackoverflow.com/questions/37362414/openmp-with-mex-in-matlab-on-mac
不知道是我的个例问题还是别的 并没有一个答案能完全解决我的问题,
我最后摸索的解决方案如下:
brew install llvm
brew install libomp
在matlab文件夹里找到clang++_maci64.xml,编辑
CXX
把clang++替换成
/usr/local/opt/llvm/bin/clang++

浙公网安备 33010602011771号