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

前端 未结 5 1436
遇见更好的自我
遇见更好的自我 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

    For folks looking for the csapp solution. Compile "csapp.c" first, then

    gcc -o filename filename.c csapp.o -lpthread
    

提交回复
热议问题