Why do I get “undefined reference” errors even when I include the right header files?

前端 未结 5 1504
遇见更好的自我
遇见更好的自我 2021-01-04 02:51

When I tried to compile this program, it failed:

#include 
#include 
#include 
#include 

voi         


        
5条回答
  •  忘掉有多难
    2021-01-04 03:35

    You probably forgot to link with the Pthreads library (using -lpthread on the command line).

提交回复
热议问题