Undefined reference to `omp_get_max_threads_'

前端 未结 3 358
既然无缘
既然无缘 2020-12-03 02:41

I\'m getting the following errors trying to compile a project: (fortran, using gfortran)

undefined reference to `omp_get_max_threads_\'

undefined

相关标签:
3条回答
  • 2020-12-03 02:57

    gcc -program.c -o obj -fopenmp

    0 讨论(0)
  • 2020-12-03 03:07

    With gcc, you need to compile and link with -fopenmp to enable OpenMP. Other compilers have different options; with intel it's -openmp, with pgi it's -mp, etc.

    0 讨论(0)
  • 2020-12-03 03:18

    The code needs to be compiled with -fopenmp.

    0 讨论(0)
提交回复
热议问题