c++ - 在 OSX 上安装 LibTorch:不支持的选项 fopenmp
问题描述
我正在尝试按照说明(此处为https://pytorch.org/cppdocs/installing.html)在 OSX 上安装 LibTorch。我一切顺利,直到“make”命令返回
Scanning dependencies of target example-app
[ 50%] Building CXX object CMakeFiles/example-app.dir/example-app.cpp.o
clang: error: unsupported option '-fopenmp'
make[2]: *** [CMakeFiles/example-app.dir/example-app.cpp.o] Error 1
make[1]: *** [CMakeFiles/example-app.dir/all] Error 2
make: *** [all] Error 2
有什么想法可以解决这个问题吗?
顺便说一句,在前面的 cmake 步骤中,Cmake 找到的编译器似乎是 Mac 上的默认系统编译器:
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
解决方案
推荐阅读
- python - Pycharm 添加命令
- sql - 如何检查Oracle sql中列之间单词的前两个字符是否相等
- javascript - Toggle B/W multiple camera on button 点击网页:HTML、JS
- python - Tensorflow:识别没有梯度的自定义损失函数中的操作
- google-apps-script - 应用脚本时间触发器根本不执行我的脚本
- reactjs - 反应状态钩子没有将更改传递给元素
- apache-camel - Apache Camel:在同一个 SFTP 的不同文件夹中复制文件
- java - java如何编译使用StringAppend添加字符串的操作以及如何定义这样的自创对象的操作行为
- android - Android 开发:已从 html 字符串生成 Pdf。在底部添加文本
- django - django-allauth:如何避免请求好友列表?