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

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

When I tried to compile this program, it failed:

#include 
#include 
#include 
#include 

voi         


        
5条回答
  •  北荒
    北荒 (楼主)
    2021-01-04 03:24

    Do

    gcc -pthread -o name filename.c (cpp)
    

    to compile the program, then

    ./name
    

    to run the program.

提交回复
热议问题