开发者

Undefined reference errors in gcc

开发者 https://www.devze.com 2023-03-22 03:16 出处:网络
gcc link results with e开发者_如何学Crrors: dns.cpp: undefined reference to \'__res_querydomain\'

gcc link results with e开发者_如何学Crrors:

dns.cpp: undefined reference to '__res_querydomain'
dns.cpp: undefined reference to '__dn_skipname'    
dns.cpp: undefined reference to '__dn_expand'
dns.cpp: undefined reference to '__res_query'

Is there another library that I need to link to?


Adding -lresolv solved this for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消