eclipse 我在哪里可以获得 OpenMP 的 .h 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4343164/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where can i get the .h file for OpenMP?
提问by tomermes
I'm searching for the omp.h
file for using it in eclipse. I failed to find it in openmp.org.
我正在寻找omp.h
在 eclipse 中使用它的文件。我在 openmp.org 中找不到它。
Where do I find omp.h
?
我在哪里找到omp.h
?
thanks.
谢谢。
回答by Dat Chu
Under Linux, you can find a file by
在Linux下,您可以通过以下方式找到文件
locate omp.h
Have you tried to simply use it with
你有没有试过简单地使用它
#include <omp.h>
and add the openmp flag to your g++ compiler flag?
并将 openmp 标志添加到您的 g++ 编译器标志中?
g++ -fopenmp sample.c
回答by jww
Where do I find
omp.h
?
我在哪里找到
omp.h
?
On Ubuntu 14:
在 Ubuntu 14 上:
$ find /usr -name omp.h
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/omp.h
/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/include/omp.h
回答by arsenm
I think it's essentially a compiler builtin, so you won't find an actual header file for it. You do however need to use whatever flags the compiler uses for OpenMP.
我认为它本质上是一个内置的编译器,所以你不会找到它的实际头文件。但是,您确实需要使用编译器用于 OpenMP 的任何标志。