学习OpenMP的第一个程序(解决:undefined reference to `omp_get_thread_num‘)
一、问题1.源代码#include <cstdio>#include "omp.h" //#incluce ""格式:引用非标准库的头文件,编译器从用户的工作目录开始搜索int main(int argc, char* argv[]) { int nthreads, tid; #pragma omp parallel private(nthreads, tid) //{ 花括号写在这会报错 { tid = omp_get_th
原创
2020-12-02 21:25:17 ·
15888 阅读 ·
5 评论