How to set up basic openMP project in CLion [duplicate]
问题 This question already has answers here : Undefined reference to `omp_get_max_threads_' (3 answers) Closed 3 years ago . I am trying to run simple OpenMP program in CLion IDE . When I run it I get an ERROR: CMakeFiles\openmp_test_clion.dir/objects.a(main.cpp.obj): In function `main': D:/.../openmp_test_clion/main.cpp:9: undefined reference to 'omp_get_thread_num' collect2.exe: error: ld returned 1 exit status Here is my code: #include <stdio.h> #include <omp.h> int main() { int id; #pragma omp