佚名通过本文主要向大家介绍了openmp gcc,openmp,openmp并行编程,openmp并行程序设计,openmp教程等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
问题: 求助如何在MAC里使用gcc和openmp(已经下载了)
描述:
解决方案1:
描述:
用homebrew下载安装了gcc和openmp,但是在xcode里输入#include <omp.h>
会报错omp.h not found
在终端里输入gcc -v
显示
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin15.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
然后我找出来了安装了的gccgcc-6.2.0 already installed
但是想调用gcc又用不了
liuchongdeMacBook-Pro:~ liuchong$ gcc-6.2.0 -o test.out -fopenmp omp.c
-bash: gcc-6.2.0: command not found
liuchongdeMacBook-Pro:~ liuchong$ gcc6.2.0 -o test.out -fopenmp omp.c
-bash: gcc6.2.0: command not found
liuchongdeMacBook-Pro:~ liuchong$ gcc6 -o test.out -fopenmp omp.c
-bash: gcc6: command not found
求助啊,搜遍所有网页,搞了好几天了还是不能用
解决方案1:
$clang omp.c -otest.out