• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Mac Mojave(10.14.1)执行Matlab的mex报错

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

先装了matlab2018b,发现很频繁的crash,同时考虑到要跑的代码在>=2017a时就计算错误,于是转战matlab2016b

matlab2016b安装后,执行mex -setup报错:

>> mex -setup
find: 37589: No such file or directory
find: 37592: No such file or directory
find: 37595: No such file or directory

尝试了matlab2015b,发现mex依然报错,通过修改/path/to/matlab/bin/mexopts.sh中macos的sdk版本,以及clang_maci64.xml中macos sdk版本,然后解决的问题。

https://blog.csdn.net/bingshanqiao/article/details/48948065?utm_source=blogxgwz6 -修改mexopts.sh

https://blog.csdn.net/sinat_38068956/article/details/80326877 -修改clang_maci64.xml

=====

顺带做了mex混编,发现-fopenmp参数传进去无法被识别。

⚡ brew install libomp
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/cask-versions, homebrew/core and homebrew/cask).
==> New Formulae
chafa           libgusb         libvirt-glib    needle          spice-protocol
cryptominisat   libpulsar       lsd             simple-scan
==> Updated Formulae
fltk ✔          eccodes         getdns          minio           pdftoipe
allure          exploitdb       glances         minio-mc        poppler
amqp-cpp        eye-d3          goreleaser      mongodb         pre-commit
ark             fluid-synth     gradle          ngspice         youtube-dl
clamav          frugal          knot            paket
diff-pdf        fuseki          knot-resolver   pdftoedn

==> Downloading https://homebrew.bintray.com/bottles/libomp-7.0.0.mojave.bottle.
######################################################################## 100.0%
==> Pouring libomp-7.0.0.mojave.bottle.tar.gz
==> Caveats
On Apple Clang, you need to add several options to use OpenMP\'s front end
instead of the standard driver option. This usually looks like
  -Xpreprocessor -fopenmp -lomp

You might need to make sure the lib and include directories are discoverable
if /usr/local is not searched:

  -L/usr/local/opt/libomp/lib -I/usr/local/opt/libomp/include

For CMake, the following flags will cause the OpenMP::OpenMP_CXX target to
be set up correctly:
  -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp -I/usr/local/opt/libomp/include" -DOpenMP_CXX_LIB_NAMES="omp" -DOpenMP_omp_LIBRARY=/usr/local/opt/libomp/lib/libomp.dylib

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
linux 安装matlab发布时间:2022-07-18
下一篇:
Mac下安装Matlab R2015b发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap