简体   繁体   English

Xcode 看不到 OpenMP

[英]Xcode doesn't see OpenMP

I've install OpenMP via homebrew:我已经通过自制软件安装了 OpenMP:

brew install libomp冲泡安装 libomp

But Xcode doesn't see file in my c-project:但是 Xcode 在我的 c 项目中看不到文件:

'omp.h' file not found 'omp.h' 文件未找到

Reinstallation of omp doesn't fix it.重新安装 omp 并不能解决问题。

How to fix this problem?如何解决这个问题?

OS: Big Sur (Intel)操作系统:大苏尔(英特尔)

I've install OpenMP via homebrew:我已经通过自制软件安装了 OpenMP:

Not exactly.不完全是。 You've installed an Open MP runtime library, but that is no use with a compiler that supports OpenMP, and Apple's compilers do not.您已经安装了一个 Open MP 运行时库,但这对于支持 OpenMP 的编译器没有用,而 Apple 的编译器不支持。

Since you are using homebrew already you can clearly use it to install a compiler which does support OpenMP.由于您已经在使用homebrew ,因此您可以清楚地使用它来安装支持 OpenMP 的编译器。 Both GCC and LLVM support OpenMP and are available in homebrew, which you choose is up to you. GCC 和 LLVM 都支持 OpenMP,并且可以在自制软件中使用,您可以自行选择。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM