我刚刚通过运行以下命令安装了OpenMP
$ brew install gcc然后我运行我的代码
$ gcc-10 -o task -fopenmp task.c然而,我得到了错误消息:
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status我的代码是:
#include <omp.h>有人能帮我吗?
发布于 2021-02-10 17:17:58
我用g++代替了gcc,解决了这个问题
https://stackoverflow.com/questions/66109769
复制相似问题