Using pthread in c++

前端 未结 1 686
走了就别回头了
走了就别回头了 2020-12-06 05:11

I am using pthread.h in a *.cc file. when I try to use pthread_exit(0); or pthread_join(mythrds[yy],NULL); it says:

相关标签:
1条回答
  • 2020-12-06 06:06

    You might try using the -pthread option to g++.

       -pthread
           Adds support for multithreading with the pthreads library.  This
           option sets flags for both the preprocessor and linker.
    
    0 讨论(0)
提交回复
热议问题